question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`onAfterChange` and redirects

See original GitHub issue

Before diving into a PR, I’d like to discuss this to determine whether the behaviour is intended.

Currently, onAfterChange runs even when the route redirects. This can result in onAfterChange running twice with the same result, as the middleware will have already changed the current page (via getState()).

Some of this could be due to a race condition in my particular case (async functions), but it seems to be that the change should “resolve” prior to running a function like onAfterChange.

Agree or disagree?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
faceyspaceycommented, Sep 26, 2017

this is done. Additional info is in a comment to the PR:

https://github.com/faceyspacey/redux-first-router/pull/101

1reaction
faceyspaceycommented, Sep 14, 2017

Been caught up with some client work, but I’ve decided I’m gonna go the mile on this one and all the related before change promises, redirects and route level versions of it. It’s just needed after all.

Read more comments on GitHub >

github_iconTop Results From Across the Web

InfoPath 2010 The number of rule actions or the ... - MSDN
InfoPath 2010 The number of rule actions or the number of calls to the OnAfterChange event for a single update in the data...
Read more >
Get MUI Slider value in onDragStop event
How can I get the current value of the Slider in the onDragStop function? Note, I'm unable to use this , as it...
Read more >
React For Beginners - Building React Component - drag13.io
onAfterChange : (v: number) => void; ... it should log into the console next text: `redirecting user to the next {link}` where `{link}`...
Read more >
Advanced C#Bot Development
... Name" model={this.region} modelProperty="regionName" onAfterChange={this. ... inside of a SecuredPage component, they are redirected to a 404 page.
Read more >
how to use response.redirect in asp.net c#, Response redirect to ...
onafterchange angular · AsyncTask with progress dialog example in android · how to update edmx in visual studio 2017 · Passing data between...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found