Tabs switching stops
Description
Tabs switching stops with enabled freeze if a screen is heavy
https://github.com/user-attachments/assets/6cd89717-1ac6-401c-8a9c-f69043141f6f
Problem appeared in react-native-screens 4.12.0 and still exist in 4.15.3 No problem on react-native-screens 4.11.1
Steps to reproduce
- Open App
- Focus heavy screen
- Unfocus heavy screen
- Focus and immediately unfocus heavy screen
Snack or a link to a repository
https://github.com/Bardiamist/diff/tree/tabs-switching
Screens version
4.15.3
React Native version
0.81.0
Platforms
iOS
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
Fabric (New Architecture)
Build type
Debug mode
Device
iOS simulator
Device model
iPhone 16 Pro
Acknowledgements
Yes
I am also facing the same issue. Please let me know if you are able to figure out any interim solution.
Having the same issue on Android. It's intermittent, sometimes it works, sometimes - grey screen :(
Same on latest...
I am experiencing this issue on 4.18.0
I believe complicated / heavy screen essentially conflict with DelayedFreeze's setTimeout due to delayed/busy JS thread.
This issue https://github.com/software-mansion/react-native-screens/issues/2972 is somewhat related and this component was last changed in https://github.com/software-mansion/react-native-screens/pull/2963
I've tried to patch DelayedFreeze to use
- requestIdleCallback / cancelIdleCallback
- requestAnimationFrame
instead of setTimeout but neithe worked.
I tracked this down to an iOS 26 specific change introduced in 4.17.0. In RNSScreen.mm, there's a willMoveToWindow: method that disables userInteractionEnabled on the window:
- (void)willMoveToWindow:(UIWindow *)newWindow
{
if (@available(iOS 26, *)) {
newWindow.userInteractionEnabled = false;
}
}
It gets re-enabled in viewDidAppear:
- (void)viewDidAppear:(BOOL)animated
{
if (@available(iOS 26, *)) {
self.view.window.userInteractionEnabled = true;
}
// ...
}
The problem is that when using enableFreeze() with tab navigation, frozen screens don't go through viewDidAppear so userInteractionEnabled never gets re-enabled and the app appears frozen. 4.16.0 works fine, 4.17.0+ is broken on iOS 26.
My workaround was to just remove the iOS 26 block in willMoveToWindow:. This might bring back some minor cosmetic glitches during transitions, but fixes the freeze.