react-router: v4 README refers to missing (or non-public) repo react-router-addons-controlled?
Missing (or non-public) repo react-router-addons-controlled?
Where is ControlledRouter component (and the react-router-addons-controlled) that is mentioned in the v4 README here?
The README links to to https://github.com/ReactTraining/react-router-addons-controlled which is a 404 (maybe it is a private repo that should be made public?)
Thanks!
Version
4.0.0-beta.5
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 3
- Comments: 18 (14 by maintainers)
I respectfully disagree that it isn’t in the scope of this library to solve. Your react-router-redux project assumes a redux solution which is fine, but what if someone wanted to use something else besides redux?
This library should provide a way to either access history or provide a way to hook into the creation of history so that other solutions like react-router-redux can use it. This should be true for both the browser and native approaches. It should not be a black box that other things cannot build on. Working around BrowserRouter is fine since it is trivial, but NativeRouter is more complex.
If and when react-router-redux supports NativeRouter I can’t envision how you would get access to the history, so that is the issue that should be discussed regarding the RRv4 API.
Removed that section (for now!).
I’ve been toying around with some new stuff for react-router-redux, but will probably land on the same sort of solution we did for 2.x and 3.x: Just sync the history with redux and let the router do its own thing. I potentially want to do a
<ControlledRouter>to give access toparams, but that would be the only real need for it.Another use case where you need access to history would be, when you want to change route from outside a react component, e.g. from inside a redux-saga.
So there’s definitely other use cases as well, for needing access to history, other than just storing route information to redux store.