what is the correct way to use Sass and React JS?

Viewed 198

I have a question. I´m Learning how to use React JS 18v. My question is: what is the best way to use Sass with React? how do you compile it? I don't want to use an extension of VSC to compile.

I will be greatfull if someone can help me :)

2 Answers

I've been using sass for quite some time, and learned that the best way to compile and use it is to turn it into css beforehand: use Koala compiler. Koala is super easy to use and will compile your sass into css lighting fast. Afterwards, just use the css file as normal :D

Actually you can use Styled Components instead pure Sass. It's a react library using Sass syntax out there, but the most value is, that you can pass the props to render styles conditionally, that makes it super useful. https://styled-components.com/docs/basics

Related