You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For attributes, I define in the markup data-my-attr-name and in the controller as @attr myAttrName
For targets however, I have to define the target name in both the markup and the controller using camelCase: data-targets="my-controller.myTargetsName" and @targets myTargetsName
I think it would be nice (more consistent?) if the markup could support kebab-case.
The text was updated successfully, but these errors were encountered:
This sounds like it might be a breaking change. If we're making a breaking change I wonder if we can really think about improving ergonomics for actions, targets and attrs to make them all consistent?
maybe attrs can drop the data- prefix? This felt like a safe choice but it's quite ugly
how bad would it be to remove the transformation altogether? Such that @attr fooBar mapped to the html attribute fooBar? IIRC attributes are case insensitive which could cause problems 🤷♂️
For attributes, I define in the markup
data-my-attr-name
and in the controller as@attr myAttrName
For targets however, I have to define the target name in both the markup and the controller using camelCase:
data-targets="my-controller.myTargetsName"
and@targets myTargetsName
I think it would be nice (more consistent?) if the markup could support kebab-case.
The text was updated successfully, but these errors were encountered: