supasate / connected-react-router

A Redux binding for React Router v4
MIT License
4.73k stars 593 forks source link

fix history listener #476

Open kale1d0code opened 3 years ago

kale1d0code commented 3 years ago

Hi amazing library can't wait to use it

however whenever I changed location my app crashed mentioning it could not find the router reducer. after some debugging I found the actions payload was malformed it had no history action and its location was an object of the values for action and location.

looking over at the history.js project, it expects its listeners to take an object which includes location and action properties, your listener expects these values to be their own parameters.

kale1d0code commented 3 years ago

turns out I'm using the wrong version of history but I'll work on this so your project can work on history v5

bbortt commented 3 years ago

@kale1d0code are you working on it? the peer deps change is missing:

"peerDependencies": {
+    "history": "^5.0.0",
-    "history": "^4.7.2",
    [...]

I could push it if you want me to. would solve #312.