Canvas disappears when updating style prop of its parent View
element
#2976
Labels
bug
Something isn't working
View
element
#2976
Description
Hi I recently bumped into this issue after updating my app from expo SDK 51 -> 52 & enabling new arch.
This issue comes from enabling new architecture since I can confirm that it doesn't show when new arch is disabled.
Please check this video first:
Simulator.Screen.Recording.-.iPhone.16.-.2025-02-25.at.15.20.59.mp4
You can see there're 3 rings drawn with skia and each being wrapped in a
View
/Animated.View
together withText
component.What each wrapper element does is to apply opacity to
1
/0.4
to both ring & text when it's selected/de-selected.The first and second rings are wrapped with
View
and the third is wrapped withAnimated.View
(reanimated).They are properly rendered on init. But once I press on that "Change" button to change
selected
state to next element, the first&second ring disappears.Canvas
elements are disappeared butText
elements are rendered correctly as they get their parent's opacity.The third one in the other hand, is rendered as expected. It's wrapped with
Animated.View
and its style prop is fromuseAnimatedStyle
, which differs from the other 2 as they areView
elements usingViewStyle
objects.I'll paste reproducible code below.
React Native Skia Version
Expo go: 1.5.0 / Expo dev build: 1.11.8
React Native Version
0.76.7
Using New Architecture
Steps to Reproduce
Copy below reproducible code and run.
Snack, Code Example, Screenshot, or Link to Repository
Ring component:
Screen:
The text was updated successfully, but these errors were encountered: