hotwired / stimulus

A modest JavaScript framework for the HTML you already have
https://stimulus.hotwired.dev/
MIT License
12.73k stars 426 forks source link

Docs: mention that controller references should be kebab-case on manual registration to avoid issues with targets #725

Open stillhart opened 1 year ago

stillhart commented 1 year ago

add an explizit line that kebab-case should be used when manually registering controller in order to avoid issues further down then line with targets. Technically snake_case also works, but that results in an unpredictable target naming. Especially in combination with the rails helper tag.div ... data: {foo_bar_target: :baz}

https://discord.com/channels/988103760050012160/1044659701213835294/1160906429109125240