-
Notifications
You must be signed in to change notification settings - Fork 33
Description
What happened?
When inactive screens are frozen (via enableFreeze(true) from react-native-screens or freezeOnBlur: true on expo-router/react-navigation screens), changing the device color scheme on one screen and navigating to another can show stale styles. The screen active during the color-scheme change updates correctly, but frozen screens may keep the previous theme styles.
Affected platforms: iOS and Android (real devices and simulators/emulators, development and production builds).
Suspected cause
Uniwind Pro applies theme-driven style updates by mutating the Shadow Tree directly, bypassing React's reconciliation. When freezeOnBlur (or enableFreeze) is active, react-native-screens freezes inactive screens, which likely prevents the C++ engine from delivering those shadow tree mutations to frozen screens. When the screen is unfrozen on navigation, the pending updates are never replayed.
Workaround
Disable freezeOnBlur / enableFreeze. This is undesirable in larger apps where screen freezing is important for performance.
Steps to Reproduce
- Create an app with at least two navigable screens (e.g. tabs/stack) styled with dark/light variants.
- Enable screen freezing (enableFreeze(true) in react-native-screens or freezeOnBlur: true on navigator screens).
- Open Screen A and change the device/system color scheme (light ↔ dark).
- Confirm Screen A updates correctly.
- Navigate to Screen B.
- Observe Screen B still uses styles from the previous color scheme.
Snack or Repository Link (Optional)
https://github.com/hayata-suenaga/uniwind-bug-1
Uniwind version
uniwind-pro 1.0.0-rc.6
React Native Version
0.83.2
Platforms
iOS, Android
Expo
Yes
Additional information
- I've searched for similar issues in this repository and found none
- I am a Uniwind Pro user