Hacker News new | ask | show | jobs
by troupo 21 days ago
> React opted for backwards compatibility

I think they opted for what these properties are actually called in Javascript: https://developer.mozilla.org/en-US/docs/Web/API/Element/cla...

I wish they'd stick with that for all properties though.

1 comments

The rationale was to follow the DOM property names to avoid clashing with reserved keywords; not because mirroring JS was the goal. Data attributes for example have always been data-*, readonly, contenteditable in lowercase, mirroring HTML.
That is probably my bias showing, because I'd rather they adipted the JS property names for everything :) Less confusion