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

Narrative violation: className and friends are NOT a React thing! They are a standard DOM property!

https://developer.mozilla.org/en-US/docs/Web/API/Element/cla...

The only "debatable" thing that React does is to use the names from the JS API in JSX (where some people would expect names from the HTML API because JSX looks like HTML)



That’s basically what I said, though? The point is that JSX is made to look like HTML so you think you’re writing HTML but you’re not, you’re using a JS API.

Also I had to laugh at the sibling replies:

> Narrative violation: className and friends are NOT a React thing!

> FWIW, the className prop is a React thing not a JSX thing

Don’t try to say it doesn’t cause confusion!




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: