I went through some articles about using Sass along with react which were really confusing. None of them properly saying how to use Sass with react. In node-sass , there are lot of issues so I couldn't make it possible. Can anyone give me proper idea about this? Also I have a doubt that is it good idea to use Sass along with react?
Vishwa Bhat
Technology Enthusiast
Both PostCSS and SASS are different in what they serve.
PostCSS helps you after you write the CSS by filling the gaps like eliminating global namespace conflicts, making your CSS compatibile with other popular browsers, slight performance improvements etc. This process happens during build time using JS plugins, you'd not have control during dev time.
On the other hand, SASS helps you while you write the CSS by providing a programming like interface where you can have variables, can compute basic math inside CSS using loops and conditions, color manipulations, reusable CSS snippets etc which finally compiles to pure CSS. This really helps in code readability and dev productivity.
I have seen many people using both PostCSS and any of the pre-processors like SASS or Less or Stylus, regardless of the framework. React+Sass works perfectly fine, it used to be my fav combo untill I came across Styled Components(CSS in JS).
Share that screenshot here, we can probably fix that.
Cheers!