Prevent a route component from running before the old routes `onCleanup` runs
When I move from one page to another with the router, the flow seems to be:
on
The issue I am running into in the
Is there a way to avoid this issue to make sure
on
PageA -> trigger move to PageB -> PageB component function runs -> PageA cleanup runsThe issue I am running into in the
PageA and PageB use a common store and on the cleanup of PageA, the store is reset however because it run after PageB's component function runs, it is reseting stuff the PageB it setting up.Is there a way to avoid this issue to make sure
PageA's cleanup never runs before the next router it loaded?