Can I use CSS for styling my ReactNative component. Currently I can only use StyleSheet like this:
var styles = React.StyleSheet.create({
autocomplete: {
backgroundColor: '#FFF',
zIndex: 5,
},
...
I want to use CSS instead of this as in ReactJs
First create a file named App.module.css
then write your pure css here
.container {
background-color: rgb(44, 0, 95);
width: 100%;
height: 100%;
}
then,
import the file in your js file
import style from './App.module.css';
Now you can this style like normal react native styling
<View style={style.container}>
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