I am trying to understand some JavaScript source code and at the top of the .js file I am seeing this:
import './style.scss';
I'm already confused. Sass is supposed to be converted to CSS. JavaScript and CSS are typically completely separate. Why would you import Sass into JavaScript?
You might want to look into JSX and React: https://reactjs.org/docs/introducing-jsx.html
JSX is an extension of Javascript that allows you to add HTML code. You wouldn't import Sass into a javascript file, you would import it in a JSX file and use it to link an element to a particular className.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With