How to Use Sass and Styled Components in a React JS Application

Why Do People Argue Over CSS-in-JS?

CSS-in-JS

Installing Styled Components

Creating a Card with Styled Components

Adding Media Queries and Nesting

Using Javascript in Styles

Using a Global Theme

Using Sass in a React Application

Setting Up Our Sass Files

Structure of Sass Folder

Setting up variables in Sass

Creating global styles for elements

Adding Classes to Elements in Component

Final thoughts on Sass vs Styled Components

I am a full-stack web developer from the midwest.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store