You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This prevents overriding StyleSheet from React Native. While this assumption was initially fine, more and more users are reporting issues where a given view/file is not responding to ShadowUpdates.
That's why I believe we should change the default behavior of the Babel plugin and allow for some customization:
By default, we will parse every file that either contains StyleSheet.create or imports from react-native-unistyles.
If someone wants to limit this, we should provide an array of imports that will trigger the Babel plugin (e.g., @/theme or lib/styles).
The other option is to fallback to the default discovery method (require import from unistyles.
Steps to Reproduce
Snack or Repository Link (Optional)
No response
Unistyles Version
3.0.0-beta.2
React Native Version
0.76.0
Platforms
Android, iOS, Web
Expo
Yes
The text was updated successfully, but these errors were encountered:
Description
Currently, to enable babel dependency discovery as mentioned here: https://www.unistyl.es/v3/other/babel-plugin#1-detecting-stylesheet-dependencies, we require that the user imports something from
react-native-unistyles
in the given file.This prevents overriding
StyleSheet
fromReact Native
. While this assumption was initially fine, more and more users are reporting issues where a given view/file is not responding toShadowUpdates
.That's why I believe we should change the default behavior of the Babel plugin and allow for some customization:
StyleSheet.create
or imports fromreact-native-unistyles
.@/theme
orlib/styles
).unistyles
.Steps to Reproduce
Snack or Repository Link (Optional)
No response
Unistyles Version
3.0.0-beta.2
React Native Version
0.76.0
Platforms
Android, iOS, Web
Expo
Yes
The text was updated successfully, but these errors were encountered: