Query param changes during navigation breaks FlowRouter
See original GitHub issueA call to FlowRouter.setQueryParams({ foo: 'bar' })
, at approximately the same time as a navigation happens, breaks the FlowRouter completely - rendering the app useless.
See reproduction with instructions included in the repro app itself:
https://github.com/arggh/flow-router-waiton-issue
Just clone the repro, run npm install
and meteor
.
Situation where this occurred and explanation what happens:
- There is a link inside a div, that takes us to another page.
- We also have a click event listener on the link’s parent
div, which has a handler that will call
FlowRouter.setQueryParams`. - User clicks on the link
- Click listener will cause a query parameter change to be triggered
waitOn
will get called on the current route- Navigation takes place and FlowRouter picks up route change
waitOn
will get called on the new routeendWaiting
will get called twice on the new routeaction
will also get called twice on the new route, once before the dynamic import promise has been resolved inwaitOn
, thus breaking the app.- Any further attempts at navigating will not work
- Version of
flow-router-extra
you’re experiencing this issue 3.6.3 - Version of
Meteor
you’re experiencing this issue 1.8.1 - Browser name and its version All of them
- If you’re getting an error or exception, please provide its full stack-trace as plain-text or screenshot
meteor.js?hash=857dafb4b9dff17e29ed8498a22ea5b1a3d6b41d:1059 Exception from Tracker recompute function:
meteor.js?hash=857dafb4b9dff17e29ed8498a22ea5b1a3d6b41d:1059 Error: Can't render undefined
at checkRenderContent (blaze.js?hash=51f4a3bdae106610ee48d8eff291f3628713d847:2285)
at contentAsFunc (blaze.js?hash=51f4a3bdae106610ee48d8eff291f3628713d847:2328)
at Object.Blaze.renderWithData (blaze.js?hash=51f4a3bdae106610ee48d8eff291f3628713d847:2401)
at BlazeRenderer.materialize (renderer.js:341)
at BlazeRenderer._load (renderer.js:258)
at BlazeRenderer.proceed (renderer.js:198)
at BlazeRenderer.startQueue (renderer.js:98)
at BlazeRenderer.render (renderer.js:90)
at Route.action [as _action] (main.js:34)
at Route.callAction (route.js:304)
Issue Analytics
- State:
- Created 4 years ago
- Comments:17 (11 by maintainers)
Top Results From Across the Web
Query parameters persist after navigation · Issue #170 - GitHub
queryParams object still holds the parameters from the view-invoice page, even though the user was taken to a new route with no parameters....
Read more >URLs and Routing - Meteor Guide
FlowRouter.getQueryParam(paramName) returns the value of a single URL query parameter. In our example of the list page from the Todos app, we access ......
Read more >angular - On query parameters change, route is not updating
Supposing we are here : some_url/deposits-withdrawals and we wish to navigate , changing only parameters. let url = "id=2&num=12321344" this.
Read more >React router detect page refresh
We check that the performance. The second way to re-render a react component is by calling a setState () with the same state...
Read more >Angular Basics: Using Query Params in Angular Routing
Today we will look at how we can pass query parameters to the URL of ... the query parameters that suit our users'...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hope this one related and will be fixed by #73 and #74 //cc @jankapunkt
@arggh opening this issue due to your report
//cc @thearabbit