nativewind
nativewind copied to clipboard
I can't use it with my app ?
Describe the bug I can't use it with my app ? I've download and added configures as the docs but tailwind not working on my project?
To Reproduce Steps to reproduce the behavior:
- Configured as a docs.
- I've added className to
<Text /> - Restarted my app but nothing changed?
Expected behavior I expected my tailwind classes working fluently and nothing.
Screenshots
Application:
The component:
babel.config.js:
Tailwind config js:
Additional context "expo": "^48.0.7", "react-native": "0.71.3", The docs: https://www.nativewind.dev/quick-starts/expo
More on this: running npx tailwind -o output.css produces the CSS file with the correct classes - they're just not being rendered in-app.
<custom-folder> must be the folder containing all your files such as src folder ^^
My case, it will be content: ['./App.{js,jsx,ts,tsx}', './src/**/*.{js,jsx,ts,tsx}']
@pynhpo Not sure about the OP but I was running this in a sandbox that only had a single App.tsx file, which is included in the content array above, and the issue still occured.
same problem +1 "expo": "~48.0.18" with expo-router
Try to add this in your main _layout file. I am using this in all my new projects with expo 49:
import { NativeWindStyleSheet } from "nativewind";
NativeWindStyleSheet.setOutput({
default: "native",
});
git the same problem with: "nativewind": "^2.0.11", "react": "18.2.0", "expo": "~50.0.7", "expo-router": "~3.4.7",
We are closing all pre-v4.1 issues now that v4.1 is released. If the problem is still happening with the latest v4.1, please open a new issue and reference this one in the description.