You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd love to see support for this babel plugin out of the box. With this plugin I don't have to switch context in my head whether I'm writing HTML or JSX, it has the advantage of making JSX a superset of HTML instead of just a slightly different formatted language.
I'd like to hear some thoughts on this from people more submerged in the React world 😄
The text was updated successfully, but these errors were encountered:
Thanks for the suggestion. While maybe handy, I don't think this plugin is a good fit for Create React App. It would likely cause confusion, because components written to use this plugin won't work without it. People would copy-paste code to a different project and it wouldn't work. In the end this question boils down to similar reasoning as #603. The plugin also isn't very popular – most people are just using className and I think it makes sense for create-react-app to follow the existing conventions in the community.
Supporting the class attribute has been suggested in React (facebook/react#5926) and it's possible that this might change in the future, but that change should happen in React, not only in Create React App. Otherwise we would be fragmenting the ecosystem.
Note that even with this plugin, JSX isn't a true superset of HTML, because of small differences like self-closing tags and prop values that can be of any JavaScript type. There's also a good explanation of why React has className instead of classhere
I'd love to see support for this babel plugin out of the box. With this plugin I don't have to switch context in my head whether I'm writing HTML or JSX, it has the advantage of making JSX a superset of HTML instead of just a slightly different formatted language.
I'd like to hear some thoughts on this from people more submerged in the React world 😄
The text was updated successfully, but these errors were encountered: