Is there a way to know when a reset action has completed?
I'm running in the following issue:
Following scenes
A -> B -> C -> D
A - list items
B -> expand on a list item + additional data
C -> display just the list item from the previous screen
D -> edit this list item.
On the edit screen I have a delete button. If I delete the item - my redux store updates and screen B, C and D will trigger an error as the object they previously loaded is no longer there. That's why I'm trying to first reset the whole stack back to A and trigger the delete when on A.
This is my code:
The animation is slow to start and my app crashes because I set editcompany and opencompany to null, but the previous scenes are still mounted. If I place this in a setTimeout:
Is there a way to know when a reset action has completed? I'm running in the following issue: Following scenes A -> B -> C -> D
A - list items B -> expand on a list item + additional data C -> display just the list item from the previous screen D -> edit this list item.
On the edit screen I have a delete button. If I delete the item - my redux store updates and screen B, C and D will trigger an error as the object they previously loaded is no longer there. That's why I'm trying to first reset the whole stack back to A and trigger the delete when on A. This is my code:
The animation is slow to start and my app crashes because I set editcompany and opencompany to null, but the previous scenes are still mounted. If I place this in a setTimeout:
then it seems to work properly, but this makes the app look unresponsive. Is there a way to know when reset has completed?