Open saltxf opened 1 month ago
I faced the same issue, as I posted on this thread: https://github.com/marklawlor/nativewind/issues/628#issuecomment-2030839305
The solution I was provided is to update nativewind to 4.0.36 and it worked.
I faced the same issue, as I posted on this thread: #628 (comment)
The solution I was provided is to update nativewind to 4.0.36 and it worked.
I have updated to 4.0.36, but what happened was an error as follows. Previously, I was using 4.0.1 and there were no issues except for the Touchable Opacity where its className wasn't functioning properly.
tailwindcss(android) rebuilding... tailwindcss(android) is taking a long time to build, please read https://tailwindcss.com/docs/content-configuration#pattern-recommendations to speed up your build time Error running TailwindCSS CLI, please run the CLI manually to see the error.Command used: node C:\Dev\React Native\weather\node_modules\tailwindcss\lib\cli.js --input "C:\Dev\React Native\weather\global.css" --output "C:\Dev\React Native\weather\node_modules.cache\nativewind\global.css.android.css" --watch
Have you ever experienced this when updating to 4.0.36? @pedrohamarques
I was running on a iOS device and didn't face this problem. Also, I run it on a Android 13 device and it worked properly. Here's some log from my terminal (ignore the Babel line):
Using src/app as the root directory for Expo Router.
tailwindcss(ios) rebuilding... done
iOS Bundled 15855ms (C:\Users\pedro\Documents\GitHub\check-in-app\node_modules\expo-router\entry.js)
Using src/app as the root directory for Expo Router.
iOS Bundled 5218ms (C:\Users\pedro\Documents\GitHub\check-in-app\node_modules\expo-router\entry.js)
› Detected a change in babel.config.js. Restart the server to see the new results. You may need to clear the bundler cache with the --clear flag for your changes to take effect.
Using src/app as the root directory for Expo Router.
tailwindcss(android) rebuilding... done
Android Bundled 308089ms (C:\Users\pedro\Documents\GitHub\check-in-app\node_modules\expo-router\entry.js)
@saltxf Maybe you need to update tailwind as well? And did you try to run the tailwind cli manually as suggested in the error?
When using the className prop on TouchableOpacity, the appearance does not change. However, when using regular CSS styles, the appearance changes as expected. This can be observed in the difference between image 1 using className and image 2 using regular CSS styles.
Code: