supasate / connected-react-router

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

Incompatibility with history.listen with history@5 #589

Open adekbadek opened 1 year ago

adekbadek commented 1 year ago

The handleLocationChange function is called as the listener to history.listen. In version 5 of history, it has the signature of (location, action, isFirstRendering), while a history's listener function has a signature of ({action, location}).

This results in a state of shape {location:{location}} (nested) after the @@router/LOCATION_CHANGE action is called.

Fix is to use version 4 of the history package.