-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
listenBefore broken in v3.0.2 #4561
Comments
What changed between 2.8.1 and 3.0.2? Any idea? I've spent all my time recently working on v4, and I don't plan on digging back into v3 any time soon. So if you can help us figure out what changed that's breaking your app and fix it, that'd be great. |
maybe it nothing in react-router but an update of the |
|
Well, the history issue tracker is full of v3 bugs, most of which are being reported by people who are trying to use the router with history. If we stop using history v3 in the router, I bet nobody will care about those bugs anymore, because nobody will use history v3. Can we update router v3 to just use history v4? All the same functionality should be there, and it seems like history v4 is fairly solid. |
Also, from #3647
😞 |
History v3 does all that query parsing and stuff right? Would have to add that in. |
I'd recommend either downgrading to history 2.x or upgrading to history 4.x. It looks like history 3.x was just a bad release, done while I wasn't looking. My apologies for that, but I don't have the time to fix 3.x right now. By all accounts things are working perfectly in 4.x. |
However v4 doesn't support code splitting so elegantly anymore, does it? |
@pke The story for code splitting in v4 is far more elegant than anything we've done previously. The router is just components now, so you can code split like you would with any other components. If you need an example, see how we're doing it on the router docs website. |
Version
3.0.2
Steps to reproduce
Use a
listenBefore
and dispatch an action in that listener.Have a
componentWillReceiveProps
that also dispatches an action.Expected Behavior
In < 3.x.x the action sent by the
listenBefore
is emitted first, before the route transition and component update.Actual Behavior
In 3.0.2 the action sent from
listenBefore
is dispatched only after the transition happened.Using the exact same branch, just reverting back to 2.8.1 makes everything work again as expected.
The text was updated successfully, but these errors were encountered: