acdlite / redux-router

Redux bindings for React Router – keep your router state inside your Redux store
MIT License
2.3k stars 216 forks source link

Fixed react-router@3 "Cannot read property 'location' of undefined" #282

Open catamphetamine opened 7 years ago

catamphetamine commented 7 years ago

https://github.com/ReactTraining/react-router/commit/a76efddfa20945807a422ac88860b7108f0cf4d5 @acdlite without this fix this library won't work with react-router@3 which is now the default version

catamphetamine commented 7 years ago

For those coming here from Google the temporary fix is:

const createRouterObject = require('react-router/lib/RouterUtils').createRouterObject
require('react-router/lib/RouterUtils').createRouterObject = function(history, transitionManager, state = {})
{
  return createRouterObject(history, transitionManager, state)
}

const ReduxRouter = require('redux-router').ReduxRouter

...
AlexNisnevich commented 7 years ago

@acdlite Any progress in getting this merged? It's annoying to have to use @halt-hammerzeit 's workaround to support react-router v3.

adamduren commented 7 years ago

@acdlite Any update on this? The last commit was close to a year ago.. Is this project no longer maintained?

AlexNisnevich commented 7 years ago

I ended up switching to react-router v4 and reorganizing my codebase to remove the need for redux-router.

I think that redux-router is no longer really necessary, and perhaps that's part of the reason it hasn't been maintained in the past year.

catamphetamine commented 7 years ago

@acdlite Any update on this? The last commit was close to a year ago.. Is this project no longer maintained?

@AlexNisnevich It is. You should have dropped it a long time ago.