I'm using the react-navigation to do the navigation part in the My App. But got some problem when trying to fulfill this function:
Now I got some screens in stack of StackNavigator:
[Main]
[Login]
[Wizard A]
[Wizard B]
After user finish the job at [Wizard B] page, the App should navigate to [Welcome] page and the previous pages should be unmounted.
I've tried to do this at my [Wizard B] container:
ownProps.navigation.dispatch(NavigationActions.reset({
index: 0,
actions: [
NavigationActions.navigate({ routeName: 'Welcome', params: {...} }),
],
}));
But it seems that the previous pages are not unmounted. Can anyone share any walkaround to force to unmount the page in the stack? Thanks a lot.