react-navigation
react-navigation copied to clipboard
The app stop working when use Animations in Tabs (new architecture)
Current behavior
With Native Modal the crash is triggered by navigating between the tabs without even opening the modal. After which the application stops and just freezes for iOS.
Also, it happens with a similar Accordion
using react-native-reanimated
In Xcode console 2 errors:
*** Assertion failure in -[RCTViewComponentView unmountChildComponentView:index:](), /Users/denys/test/RGModal/node_modules/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm:141
More details on the videos.
It happens when I use the new architecture RCT_NEW_ARCH_ENABLED=1
, but if disabled then it works well
Android looks good.
I thought at first that it was a crash with react-native-screens
. Here is the opened issue: https://github.com/software-mansion/react-native-screens/issues/2280
But upgrading the react-navigation
packages to 7.x RC resolved the issue for me.
https://github.com/user-attachments/assets/48f4d1c3-9afb-4632-8d62-c9cd4b589985
https://github.com/user-attachments/assets/59757472-eae7-450c-a137-15bb8046b62a
Expected behavior
react-navigation bottom tabs shouldn't crash in the new arch when using Modal or Animations
Reproduction
https://github.com/denysoleksiienko/modal-freeze-gesture
Platform
- [ ] Android
- [X] iOS
- [ ] Web
- [ ] Windows
- [ ] MacOS
Packages
- [X] @react-navigation/bottom-tabs
- [ ] @react-navigation/drawer
- [ ] @react-navigation/material-top-tabs
- [ ] @react-navigation/stack
- [ ] @react-navigation/native-stack
- [ ] react-native-tab-view
Environment
- [] I've removed the packages that I don't use
package | version |
---|---|
@react-navigation/native | ^6.1.18 |
@react-navigation/bottom-tabs | ^6.6.1 |
@react-navigation/stack | ^6.4.1 |
react-native-safe-area-context | ^4.10.8 |
react-native-screens | 3.32.0 |
react-native-gesture-handler | ^2.18.1 |
react-native-reanimated | ^3.14.0 |
react-native | 0.74.4 |
node | 20.15.0 |
npm or yarn | 3.6.4 |