connected-react-router
connected-react-router copied to clipboard
@@router/LOCATION_CHANGE event is not documented
The project I'm working on recently adopted connected-react-router, to replace the now defunct react-router-redux. For the most part this was painless, just replacing import
statements, which was fantastic. We did however have one significant problem, which was with the LOCATION_CHANGE event.
For those that do not know, the LOCATION_CHANGE event for connected-react-router differs from react-router-redux in that the payload places data related to the location into a location
object.
As there is no documentation either for this event, or advice for developers such as ourselves migrating from react-router-redux, we were not aware of this difference, and unfortunately that led to a few gnarly bugs in our code. Once I'd managed to identify this difference the migration path was relatively simple.
It would be good if there was documentation for the LOCATION_CHANGE event provided, and also further documentation to point out the difference for people coming from react-router-redux.