+ 1

Using SASS in REACT

I want to use SASS in my CRA App. Should I create a .scss file and import it directly to the component, or do I need to compile the sass file into css and then use that css file in my component. I will be using modules like "App.module.scss" in react. Thanks in advance.

31st Aug 2022, 2:01 PM
NBinte
NBinte - avatar
1 Resposta
0
You have to install the module with ' npm install node-sass --save-dev' or 'yarn add sass' if you use yarn. Next create your .scss files, it should work. import your scss file in your component. https://create-react-app.dev/docs/adding-a-sass-stylesheet/
1st Sep 2022, 5:17 AM
Roland
Roland - avatar