Closed shalkauskas closed 1 month ago
Please move
const PendoNavigationContainer = WithPendoReactNavigation(NavigationContainer);
To a global scope so it won't be executed every time the component is rendered.
Moving PendoNavigationContainer to App.js did not help, but wrapping it in React.useMemo to avoid re-execution did solve the issue with both console warning and navigation reset, thanks @udilevin
Platform + Version IOS 18, Android
SDK Version 3.1.1 3.4.0
Framework React Native using React Navigation
Describe the bug When
appState
is changed from 'active' to 'background', navigation immediately reset to initialRoute. For example, when app opens camera or gallery to select a picture, navigation resets to initial route. ReplacingPendoNavigationContainer
withNavigationContainer
from @react-navigation solves the issue. Happens on all Android versions and devices, but only sometimes on iOS (when app asks for permissions to use camera/gallery). Minimizing the app resets the navigation as well. First noticed on SDK 3.1.1. Updated to latest 3.4.0, but issue remains. Also after updating, console returns a warning:Expected behavior Navigation state does not reset on appState changes.
Logs Log on 3.1.1
Log on SDK 3.4.0
Sample Code NavigationSetup.js
Navigation setup in App.js