In a React application, you are tasked with styling a button that changes its background color based on a prop passed to it. Which CSS-in-JS library would be ideal for this?

  • Styled-components
  • Bootstrap
  • Tailwind CSS
  • SCSS
Styled-components is a popular CSS-in-JS library for React. It allows you to define component styles directly in your JavaScript code and can easily style components based on props, making it ideal for dynamic styling based on prop values.
Add your answer
Loading...

Leave a comment

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