Adding SASS to create-react-app
Installation
In new project, install sass. https://www.npmjs.com/package/sass#usage
Importing SASS
Rename
App.csstoApp.scss. Alsoindex.csstoindex.scss.- In
App.jsandindex.jsfix the import from css to scss. It will result:
Sass Extensions for VS Code
Using SASS
- You can edit the scss either in
App.scssorindex.scss
for example, clear all code in app.scss, then add the following: