question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Styles are not applied on expo-web

See original GitHub issue

Describe the bug Classnames are applied to html elements however they have no effect on style. I believe it’s related with some versioning. It started to be unavailable after I upgraded couple of packages probably these ones:

    "expo": "^46.0.0",
    "react-native-web": "~0.18.7"

To Reproduce I have created a simple repo which I try to change bg color to green which doesn’t work. https://github.com/suchcodemuchwow/nativewind-error I have run this command: expo start --web --https --clear

Expected behavior Styles are applied visually.

Expo Snack If applicable, add a link to an Expo snack demonstrating the issue. There are multiple example snacks available at nativewind.dev. https://snack.expo.dev/@git/github.com/suchcodemuchwow/nativewind-error

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
marklawlorcommented, Aug 7, 2022

You are using RNW 0.18, so NativeWind switches to CSS. You will need to generate your .css using Tailwind CLI and import it like a normal web project.

0reactions
mattwighamcommented, Aug 22, 2022

Ahh, missed that. That fixed me up, I was definitely missing some things. Thanks so much @marklawlor. Congrats on 2.0.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSS is Not working on Web. · Issue #31 - GitHub
I am using the expo. For web css styles are not loading but for mobile ( ios & android ) styles are loading...
Read more >
react native - Custom styles aren't loading on expo
I was expecting the custom styling to be applied, but no changes on default styles were made when I tried running the App...
Read more >
WebBrowser - Expo Documentation
Package of browser to be informed. If not set, preferred browser will be used. This method initiates (if needed) CustomTabsSession and calls its...
Read more >
Expo style on web browser but not on phone : r/reactnative
I'm using expo cli and my style on my app is applied on the web browser but not on my phone, someone has...
Read more >
View - Expo Web - GitBook
React Native for web provides access to browser-only style properties. The following styles apply to any primitive that extends `ViewStylePropTypes` like ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found