I’m trying to find a way to implement SASS in my react native project. All I found is this package react-native-sass-transformer, but it doesn’t seem to work on my end. Tried looking for other way but all I see is approach in React instead. Does anyone know another way into implementing SASS in a react native cli project? Thank you!
Question posted in React native
The official React Native documentation can be found here.
The official React Native documentation can be found here.
2
Answers
I bet you’re trying to use react native sass transformer with .tsx (typescript implementation), if it’s the case, you just need to :
And then it should work.
You can also use: https://github.com/kristerkari/react-native-typed-sass-transformer to handle types (I didn’t tried yet, but I’ll !)
Good luck!
Are you using Expo and running it on the web? , if that’s the case, the problem you’re getting is caused because by default Expo uses webpack and not Metro, so it is required to change app.js
more information here