successor of tailwindcss for styling
npm install nativewind
npm install --dev tailwindcss
Create tailwind.config.js
module.exports = {
content: ["./App.{js,jsx,ts,tsx}", "./Components/**/*.{js,jsx,ts,tsx}"],
theme: {
extend: {},
},
plugins: [],
}
Change babel.config.js
// babel.config.js
module.exports = function (api) {
api.cache(true);
return {
presets: ["babel-preset-expo"],
//add this line
+ plugins: ["nativewind/babel"],
};
};
Thats it done now go and play with react native
now
<Text className="text-sky-500">The Boom GUY</Text>
this will make it sky in color with darkness 500