Open brentvatne opened 5 years ago
Do you have any suggestions in mind to handle async? I looked at the source code of getStateForAction
and it is not async itself so how do we get the router to wait until the async operation is completed?
For the back case: what I do is returning nothing and let my function handle the goBack action itself.
https://reactnavigation.org/docs/en/routers.html#blocking-navigation-actions - this is pretty barebones. One use case that came up was to fire a query when the user presses back and only complete that when the query is complete and the result matches some criteria. These docs don't say how to handle async