We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
<style>
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The new <style> page shows this snippet at the very top:
<style> p { color: red; } </style>
While it is totally valid in regular HTML, it does not work in JSX (would be nice if it did though).
Error /src/App.js: Unexpected token, expected "}" (3:21) 1 | export default function App() { 2 | return ( > 3 | <style> p { color: red; } </style> | ^ 4 | ); 5 | } 6 |
https://react.dev/reference/react-dom/components/style
I believe JSX requires this workaround:
<style>{` p { color: red; } `}</style>
The text was updated successfully, but these errors were encountered:
[typo] syntax looks wrong reactjs#6633
4cffeeb
[typo] syntax looks wrong #6633 (#6641)
35530ee
Fixed in #6641
Sorry, something went wrong.
No branches or pull requests
Summary
The new
<style>
page shows this snippet at the very top:While it is totally valid in regular HTML, it does not work in JSX (would be nice if it did though).
Page
https://react.dev/reference/react-dom/components/style
Details
I believe JSX requires this workaround:
The text was updated successfully, but these errors were encountered: