-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Description
Here's what my routing tree looks at its simplest:
<Router>
<Route name="errorModal" type="modal" component={ErrorModal}/>
<Route name="mainScreen" initial={!needSignIn}>
.. tab bar stuff ...
</Route>
<Route name="Login" initial={needSignIn} component={LoginScreen}/>
</Router>
Whenever an error happens within the app, I usually call Actions.errorModal({message: 'bad'})
. However, during testing I noticed if I call that modal, then Actions.dismiss()
and immediately afterwards call the error modal again then Actions.dismiss()
a second time, the modal will not dismiss. Then, if I try to navigate to another part of the app, the app will crash with the following error:
It looks like there's an error with resetting the route stack when calling dismiss()
and the router can't handle a second modal being called immediately thereafter (with no other navigation). Is this a bug or am I not properly using modals?
Metadata
Metadata
Assignees
Labels
No labels