What does "CSS-in-JS" mean in the context of React?

  • A styling approach where CSS files are imported directly into JavaScript files.
  • A method to write CSS code within JavaScript code using template literals.
  • A technique for adding CSS styles to HTML elements using class attributes.
  • A way to write CSS files and JavaScript files separately.
"CSS-in-JS" in React refers to a technique where you write CSS code within JavaScript using template literals. This approach allows for dynamic styling and scoped styles, enhancing component-based styling in React applications. The other options describe different CSS-related approaches but not specifically "CSS-in-JS."
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *