|
|
|
|
|
by afavour
1251 days ago
|
|
Just one example: the class attribute in HTML vs className in JSX. It’s not that it’s complicated, you just use one or the other. But it’s very indicative of what’s going on under the hood: despite looking exactly like HTML, JSX isn’t creating HTML. It’s creating elements via JavaScript APIs. |
|
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)