Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My only real gripe about JSX is the crazy attribute casing rules. If it looks like HTML then attributes should be case-insensitive just like HTML. The worst of it is (unless this has changed) they are just silently dropped without any error message.


The React ESLint plugin's no-unknown-property rule is handy for catching (and automatically fixing) this:

https://github.com/yannickcr/eslint-plugin-react/blob/master...


Good to know, thanks.

That's a good stop-gap, but the tool itself should either pass through everything to the HTML or throw errors on anything that isn't going to get passed through. The silent failure mode is a UX bug.


If I understand your comment correctly, this is checked in more recent versions of React: https://facebook.github.io/react/warnings/unknown-prop.html


It does seem to be the same issue. That's great, it will certainly avoid some frustration.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: