Some Thoughts about Stimulus API

For example, to access Stimulus Targets, we use below property

  1. We should add suffix to the target name
  2. We should capitalize the first letter if to access has[Name]Target

I do not like this pattern and want to improve it

What about this way?[name]

I do not need to change the case of the Targets, and the API seems more cleaner.

I decide to build simple package to solve the problem and now the code is open sourced on , and here is the npm package stimulus-magic - npm

Any feedback is welcome.