|
|
|
|
|
by dmitriid
2855 days ago
|
|
`className` to `class` is a bad decision. React is a very thin layer on top of JS. `className` is JS. Specifically, it comes directly from DOM APIs. Changing it to `class` (while retaining all other DOM API-compatible prop names) is a really terrible decision that relies on “the wisdom of the crowds”. |
|
And most of the time you see it you’re making JSX elements, where you would expect to use the word ‘class’.
I think they’re right it’s more consistent with what people would expect to happen.
The fact there is a special note in the docs calling out that everyone gets it wrong is a sign it was a problematic choice.