Closed rumbogs closed 5 years ago
On Android, using push with a stack based navigation, makes the screen mount, unmount and then finally mount before navigating to the path. iOS works fine.
push
Only pasting the important parts:
import { Navigation } from 'react-native-navigation'; class InstallComponent extends React.PureComponent<Props> { componentDidMount() { console.log('componentDidMount'); } componentWillUnmount() { console.log('componentWillUnmount'); } render() { return <InstallScreen />; } } screens.set('install', props => { const { InstallComponent } = require('~/screens/install-component'); return <InstallComponent {...props} />; }); screens.forEach((ScreenComponent, key) => Navigation.registerComponent(key, () => withProvider(ScreenComponent, store, persistor, key), () => ScreenComponent) );
This will log
componentDidMount componentWillUnmount componentDidMount
Proved to be something with the custom withProvider.
withProvider
Issue Description
On Android, using
push
with a stack based navigation, makes the screen mount, unmount and then finally mount before navigating to the path. iOS works fine.Steps to Reproduce / Code Snippets / Screenshots
Only pasting the important parts:
This will log
Environment