@kjf wrote:
I’m curious to find out what naming conventions people are using for their actions.
Our app is a mix of camel-case eg:
selectImage
and kebab-case eg:on-save
and we’re trying to settle on one convention that works. I’ve seen both approaches used in popular add-ons and core ember seems to preferkebab-case
judging by the conventions used in on the input component actions however there doesn’t seem to be any clear indicator as to what’s preferred in the community.One thing I like in the react world is the convention of
onClick={handleClick}
for event bindings, where the left side of the binding isonSomething
and the right hand side ishandleSomething
. That seems to work great for react howeverhandleClick
doesn’t feel very ember like to me.I’m very curious to get other peoples take on things.
Posts: 2
Participants: 2