-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix for state not updating on route change #40
base: master
Are you sure you want to change the base?
Conversation
👍 👍 👍 |
@ryanflorence really hoping to get this merged and pushed up, I would rather not have to use a fork of this for a work demo :) |
This will also fix that annoying " |
@rexxars @ChiefORZ I needed this and a few other unmerged PR's so I forked it and published to npm with all the latest code: https://github.com/NavJobs/async-props |
Thanks @zackify! |
what does this fix? |
quick history on If you click on a link, and then click on another link before the async props are done we could have two requests (or more) that are inflight simultaneously. Imagine the props for the first request are slower than the props for the second. In these scenarios the first props land last, and then would callback and cause problems. So there's a check that the location is the same as when the request started, if the location has changed, we just ignore the data that comes back. This change puts the race condition right back into the app. So what exactly is this fixing? |
It's been a while now. But switching pages was just not working. Nothing
|
My Issue #34 describes it in a way...Instant Callbacks - or Routes where no Props are needed - were not loading at all... Nothing happened. |
Can you folks try out 0.3.0 and see if it's still buggy in your app? |
@ryanflorence so far so good, 0.3.0 is awesome! Don't need my fork anymore :D |
We will update soon.. appreciate you cutting a new release--thanks @ryanflorence! |
Turns out, this was the problem. When the route changes, the update is not being forced. Also removed
RoutingContext
from the readme for you.