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
{{ message }}
This repository was archived by the owner on Dec 19, 2024. It is now read-only.
I'm experiencing a problem where when there werequeryParams before navigating to a new URL without query params, route-changed is dispatched twice, the first time around with bad state (i.e., contains the old queryParams).
E.g., start with URL:
/context/?param=foo
route-changed is dispatched:
appRout.queryParams === {param: "foo"}
user clicks on <a href="/context">...</a>, and route-changed is dispatched:
appRoute.queryParams === {param: "foo"}
but then route-changed is immediately dispatched a second time:
appRoute.queryParams === {}
The work-around I'm using is wrapping my route-changed event handler in a 0ms-debounce, which allows the event loop to recycle and finish the required mutations to the state of the queryParams. However, route-changed is still dispatched twice.
I'm experiencing a problem where when there were
queryParamsbefore navigating to a new URL without query params,route-changedis dispatched twice, the first time around with bad state (i.e., contains the oldqueryParams).E.g., start with URL:
route-changedis dispatched:user clicks on
<a href="/context">...</a>, androute-changedis dispatched:but then
route-changedis immediately dispatched a second time:The work-around I'm using is wrapping my
route-changedevent handler in a 0ms-debounce, which allows the event loop to recycle and finish the required mutations to the state of thequeryParams. However,route-changedis still dispatched twice.