-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Description
Hey!
A new issue came up and was reported by a Unistyles user. When both a CSS Transition and a Unistyles style are attached to the same component, theme changes don’t apply to those nodes.
I debugged it, my ShadowTree update sends the correct values, but it looks like CSS Transition nodes are handled differently on your side, which blocks me from applying any updates on top.
That’s not the case for regular Animated components using useAnimatedStyle. Could you let me know why this happens and more importantly how I can push an update for those nodes?
At first I thought it was because you spread the styles, but after checking your filterNonCSSStyleProps function, I realized that was a wrong assumption.
Steps to reproduce
- Open the app
- Tap on "Check box" button
- One button will change color immediately and second one will slowly transition
- Tap on "Change theme" button
- One button won't take in count new color applied by Unistyles (from ShadowTree)
Shadow tree styles pushed to ShadowTree by Unistyles are correct:
Each section represent one ShadowNode and styles that should be applied.
Original issue: jpudysz/react-native-unistyles#1007
Snack or a link to a repository
https://github.com/believer/unistyles-repro
Reanimated version
4.1.3
Worklets version
0.6.1
React Native version
0.81.4
Platforms
Android, iOS
JavaScript runtime
Hermes
Workflow
React Native CLI
Architecture
New Architecture (Fabric renderer)
Build type
Debug app & dev bundle
Device
iOS simulator
Host machine
macOS
Device model
iPhone 16e
Acknowledgements
Yes