Hacker News new | ask | show | jobs
by syntor 3185 days ago
I always assumed `class` was a keyword, which is why then went with `className` instead.
2 comments

Yes, the reason is that you can't write something like

    const { class } = props
Which is very common and deeply confusing.

So even though "class" will technically work now, it will still warn, and ask that you use "className".

(And officially supporting both would make it confusing for third party components since each would have to also support both.)