react-native-screens: Rerendering parent view causes incorrect swipe animation offset
I’m using react-native-appearance to listen to the system appearance change event. When the system appearance changes, all the mounted screens will rerender. With enableScreens
called, the parent screen will animate incorrectly on iOS, as the screenshot below.
react-navigation: 4.0.10 react-navigation-stack: 1.10.3 react-navigation-tabs: 2.5.6 react-native-screens: 2.0.0-alpha.8 react-native: 0.61.4 system: iOS 13.2
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 18 (2 by maintainers)
I have possibly the same issue.
I can only seem to reproduce it in Release mode.(Edit: reproduced Debug Mode also) Basically I can swipe the screen to the right, creating the gap on the left side. Almost like a drawer that should not exist…I’m not sure if this is an issue with this repo or react-navigation
You just need to replace your
import { createStackNavigator } from 'react-navigation-stack'
withimport createNativeStackNavigator from 'react-native-screens/createNativeStackNavigator';
. It should resolve your issues (refer to docs https://github.com/kmagiera/react-native-screens#using-native-stack-navigator)I’ve already migrated to react-navigation v5 and react-navigation-stack v2, no more this issue so far.