Hacker News new | ask | show | jobs
by chrisweekly 2855 days ago
Highly recommend reading Dan's reasoning; it makes a lot of sense. This quote is as close as I can get to distilling it:

>"I think this is the primary reason it's desirable for props like tabIndex, cellSpacing, and most other DOM-related props to follow the camelCase convention. It's not because they're DOM property names. It's because they often end up in component APIs. And we want component APIs to be consistently camelCase."

1 comments

But both class and className are camelCased.
I don't understand the "but" in your uncontroversial comment.
It seemed to me that the paragraph you quoted does not much illuminate why one should choose for one or the other.