acdlite / redux-router

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

Update reduxReactRouter to accept history object #169

Closed agirton-twitter closed 8 years ago

agirton-twitter commented 8 years ago

When using history basename function it returns an object. Before this it would only accept a function that returns an object. This update gives users the ability to use other helpers provided by history.

Also update to the tests to account for this new behavior. Most of the tests were kept in this describe block to ensure all other routes stayed the same and that history properly uses the basename for determining root.

One other piece I would like to note is that similar logic also lives in useDefaults. I considered creating an abstraction for both of these instances, but rather not create the wrong one and have to create edge cases for both down the line.

This would fix issue #158

Scarysize commented 8 years ago

@agirton-twitter there is some problem with merging this correctly. I´m looking into it... Thanks for the PR though!

Scarysize commented 8 years ago

@agirton-twitter It would be nice, if you could update your branch. This should resolve the merge issue.

agirton commented 8 years ago

@Scarysize I've rebased on top of the latest master. Re-ran tests to ensure all pass. Last I checked Travis was failing but that was because it said it couldn't find the history/lib/useBaseName module.

Scarysize commented 8 years ago

@agirton Nice one. Just checked the tests locally, everything passes. Thank you!