CONTACT US

How To Use Styled-Components In React

A promotional banner for a Smashing Magazine article titled How To Use Styled-Components In React by Adebiyi Adedotun. The banner features abstract graphics and a stylised profile image of a person.

Why Styled Components?

 

Apart from helping you to scope styles, styled components include the following features:

 

  • Automatic vendor prefixing
    You can use standard CSS properties, and styled components will add vendor prefixes should they be needed.
  • Unique class names
    Styled components are independent of each other, and you do not have to worry about their names because the library handles that for you.
  • Elimination of dead styles
    Styled components remove unused styles, even if they’re declared in your code.
  • and many more.

Article link copied

Close button