Connected-react-router: Support react-redux v7

Created on 9 Apr 2019  路  15Comments  路  Source: supasate/connected-react-router

Most helpful comment

My fix for react-redux has been merged in https://github.com/reduxjs/react-redux/pull/1278 and #303 will be ready once a new version of react-redux is released.

All 15 comments

I am waiting for this as well - thank you for opening this.
Please upgrade to react-router 5.0 as well - you are currently tied to v4:
https://github.com/supasate/connected-react-router/blob/a8e92e6ee160b07876819219a8393816c9a000c4/package.json#L39

I tested and it seems like it's not backward compatible. I had no time to look through it yet, but, I think it may be related to the way it changed the subscription back from Context API to direct subscription (See #191 when it changed from direct subscription to Context API).

I'll take a look during the weekend. In the meantime, PR is welcome.

I upgraded to react-redux v7 and it seemed to work fine for me:

> yarn why react-redux
=> Found "[email protected]"

> yarn why connected-react-router
=> Found "[email protected]"

@supasate First thanks for the work you put into connected-react-router. Really helpful !

For information, looks it works for me with react-redux 7. Sorry I could not go deeper in the internal changes. Seems too complex for me ;) Thx again for great work, it's appreciated

Most of the changes in #191 seem to relate to documentation. If anything needs reverting to support v7 it shouldn't be too bad. And I'd also like to thank @supasate for your work on this project!

It is working for me with react-redux 7.0.2

I've created a PR to allow react-redux@7. However, passing a custom context does not currently work: https://github.com/supasate/connected-react-router/pull/303

My fix for react-redux has been merged in https://github.com/reduxjs/react-redux/pull/1278 and #303 will be ready once a new version of react-redux is released.

It seem that react-redux has published new version 7.1.0 a week ago

Looks like #303 got replaced by #321, which seems about ready to be merged.

Released in v6.5.0.

Hi @supasate,

Today I upgrade router related packages in my project after that, I am getting 2 errors while running the project.

Packages which are updated from and to versions

"connected-react-router": **"6.5.0"**, Upgraded from **"5.0.1"**
"react": **"16.8.6"**, Upgraded from **"16.8.2"**
"react-dom": **"16.8.6"**, Upgraded from **"16.8.2"**
"react-redux": **"7.1.0"**, Upgraded from **"5.1.1"**
"react-router-dom": **"5.0.1"**, Upgraded from **"4.3.1"**

The error which I am getting

  1. Uncaught Invariant Violation: Could not find "store" in either the context or props of "Connect(t)". Either wrap the root component in a , or explicitly pass "store" as a prop to "Connect(t)"
  1. Uncaught Error: Invariant failed: You should not use outside a

image

Please let me know how to fix these 2 issues.

The same issue here. Any updates yet?

@BiosBoy How can developers recreate the bug on their end? Please create a new issue and provide repro steps, include a copy of your code (or create a repro repository) and the full output of your run. Otherwise there's nothing to work on.

I'm having the same problem. @prepaka did you find a solution?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

BerndWessels picture BerndWessels  路  3Comments

jhwheeler picture jhwheeler  路  3Comments

alexseitsinger picture alexseitsinger  路  3Comments

preciselywilliam picture preciselywilliam  路  4Comments

nickvoronin-ellation picture nickvoronin-ellation  路  5Comments