Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4826

Action naming conventions, what's your preference?

$
0
0

@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-saveand 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 prefer kebab-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 is onSomething and the right hand side is handleSomething. That seems to work great for react however handleClick doesn’t feel very ember like to me.

I’m very curious to get other peoples take on things.

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4826

Trending Articles