vitalets / react-native-extended-stylesheet

Extended StyleSheets for React Native
MIT License
2.93k stars 132 forks source link

Not working with "react-native": "0.61" until fast refresh reload #119

Closed ue closed 4 years ago

ue commented 4 years ago
    "react": "16.9.0",
    "react-native": "0.61.0-rc.3",
    "react-native-extended-stylesheet": "^0.12.0",

in debug mode first opening the stylesheet not working until fast refresh via 61

vitalets commented 4 years ago

hey @ue ! I will recheck. Could you clarify what do you mean under "fresh reload"?

ue commented 4 years ago

Hi @vitalets thanx for interesting the issue,

the latest release for react-native came with default enhanced hot reload that means. It working like before as hot reload. When started the application as debug mode the app getting error cuz of the styles not recognized for first starting. Until doing fast refresh it start to recognize again. That's the error. If you have time to try with latest release, you will understand better than my explanation :)

Btw: title edited.

vikrantnegi commented 4 years ago

@ue I think you mistakenly tagged me instead of @vitalets

mdivani commented 4 years ago

Got the same issue, I need to reload whole app for styles to be available. is there a way to call styles.build asynchronously, cause that would solve my issue.

vitalets commented 4 years ago

Hi guys, can't reproduce the issue:

  1. just created fresh Rn 61 app npx react-native init EStyleSheetRN61
  2. checked that it's working
  3. installed estylesheet npm i react-native-extended-stylesheet --save
  4. imported it to App.js, replaced StyleSheet.create with EStyleSheet.create, add $textColor: 'red',.
  5. added EStyleSheet.build()
  6. re-launch the project - everything works
  7. changed App.js to check hot reload - changes aaplied.

Here are my App.js

react: 16.9.0 => 16.9.0 
react-native: 0.61.4 => 0.61.4

Please provide more details, how to reproduce the issue.

ue commented 4 years ago

I just reinstall and clear cache build etc. it works for me. Thanks, closing @vitalets