You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to know what the target route is going to be in beforeExit. There are a few use cases for this, like conditionally allowing navigation only between certain routes, or conditionally running cleanup of state if we know it won't be needed on the next page (but leaving it if it is needed, such as in a child routing situation). For now, I can accomplish this by caching the previous view in beforeExit and moving the logic to beforeEnter, but this seems wasteful and kinda dirty.
I'm pretty sure I can do this trivially by just additionally passing view (and maybe even paramsObj and queryParamsObj) on this line:
I need to know what the target route is going to be in
beforeExit
. There are a few use cases for this, like conditionally allowing navigation only between certain routes, or conditionally running cleanup of state if we know it won't be needed on the next page (but leaving it if it is needed, such as in a child routing situation). For now, I can accomplish this by caching the previous view inbeforeExit
and moving the logic tobeforeEnter
, but this seems wasteful and kinda dirty.I'm pretty sure I can do this trivially by just additionally passing
view
(and maybe evenparamsObj
andqueryParamsObj
) on this line:mobx-router/src/router-store.js
Line 26 in e4eeb59
Thoughts?
The text was updated successfully, but these errors were encountered: