-
Notifications
You must be signed in to change notification settings - Fork 593
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
Initializing bug in 6.3.2? #266
Comments
I had a somewhat related issue (#267) caused by the fix present on v6.3.2 that makes Since you say you're opening a new tab (therefore causing a "first rendering" of the page), I suspect it's the same cause. I guess the problem comes from this statement in the reducer code: https://github.com/supasate/connected-react-router/blob/v6.3.2/src/reducer.js#L24 return isFirstRendering
? state
: merge(state, { location: fromJS(location), action })
}
I suspect something like:
|
@mdupont That sounds like a plausible explanation. I don't see how this isn't bad behavior, though. In the world of a single page app, there are still times where you legitimately want to open a second window of the app, and you certainly don't want that new window navigating somewhere you didn't tell it to. In my case, I open that second window to a specific route (e.g. One potential solution here is that So it still seems to me like the behavior in 6.3.2 is broken, but I'd be happy to be wrong here, so long as there's a solution that gets me where I need to be. FWIW, I use |
Okay, so it looks like adding |
@bmueller-sykes - dropping in to say that the blacklist fix worked for me as well. If you're running a production app, you may also want to add a migration to remove Mine looks like this, and seems to do the trick: state => {
const { router, ...restOfState } = state;
return restOfState;
}, |
Hi,
After upgrading to 6.3.2 today, my published react project started acting wonky. What appears to be happening is that if I open my app in a browser, it will be re-directed to the last opened page. For example, let's say browser tab A is opened to:
http://mysite.com/path/to/something
...and then I open browser tab B and navigate to:
http://mysite.com/totally/different/path
...browser tab B will be redirected to
http://mysite.com/path/to/something
...immediately. I wasn't able to run any extensive testing I'm afraid, as I had to downgrade right away to get to some pressing work. I'm running React 16.8.4, react-router 4.3.1, and connected-react-router 6.3.2 (before the downgrade).
My config is as follows.
I have a custom history setup like this:
...and then my (somewhat stripped down) store config looks like this:
Hmm...could this be a bad interaction between
redux-persist
, I wonder? As I said at the top, this doesn't happen under 6.3.1, so it seems like the problem is localized toconnected-react-router
, but I could imagine some bad interaction between the different libraries.Hope this is useful!
The text was updated successfully, but these errors were encountered: