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
When using entering/exiting layout animations on Animated.View components, the component can get stuck on screen even after it has been removed from the React tree. The view remains visible indefinitely and cannot be cleared without reloading the app.
This seems to happen when layout animations are running while the UI thread is under heavy or spiky load.
reanimated4-bug.mov
I also want to point out that it works as expected with Reanimated 3 (on fabric).
Steps to reproduce
The reproduce repo renders a fixed grid of slots where each slot conditionally mounts an Animated.View with entering={ZoomIn} and exiting={ZoomOut}. Items cycle through mount → unmount every 100ms. Every second, a spike of 30 additional short-lived animated views is mounted and immediately unmounted to stress the UI thread.
Steps:
Clone the repo and run on an affected device
Tap Start — items begin cycling in and out with zoom animations
Observe that items sometimes remain stuck on screen after the spike, even though they are no longer in the React tree
Note: The SPIKE_COUNT and SPIKE_INTERVAL_MS constants in src/App.tsx may need to be tweaked per device to create a sufficient spike without crashing.
Description
When using
entering/exitinglayout animations onAnimated.Viewcomponents, the component can get stuck on screen even after it has been removed from the React tree. The view remains visible indefinitely and cannot be cleared without reloading the app.This seems to happen when layout animations are running while the UI thread is under heavy or spiky load.
reanimated4-bug.mov
I also want to point out that it works as expected with Reanimated 3 (on fabric).
Steps to reproduce
The reproduce repo renders a fixed grid of slots where each slot conditionally mounts an
Animated.Viewwithentering={ZoomIn}andexiting={ZoomOut}. Items cycle through mount → unmount every 100ms. Every second, a spike of 30 additional short-lived animated views is mounted and immediately unmounted to stress the UI thread.Steps:
Tested on device and emulators
Snack or a link to a repository
https://github.com/pthorsson/reanimated4-layout-animations-bug
Reanimated version
4.1.14.2.3Worklets version
0.5.10.8.1React Native version
0.81.5
Platforms
Android
JavaScript runtime
Hermes
Workflow
Expo Dev Client
Architecture
New Architecture (Fabric renderer)
Reanimated feature flags
No
React Native release level
Stable
Build type
Debug app & dev bundle
Device
Real device
Host machine
macOS
Device model
Galaxy Tab Active4 Pro 5G (SM-T636B)
Acknowledgements
Yes