-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Doesn't work with { connect } from 'redux'. #4252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The |
So simply put, I can't use connect from redux if I decide to go with react-router v4? |
No, you can use redux, but you need to be aware that |
So I have to write every component in class form (instead of function short form), then subscribe to location inside |
Just so you know, we are looking to remove sCU usage in an upcoming version of react-redux: reduxjs/react-redux#507 But this is a dupe of #4035 |
basically, write a component that changes when url changes (wraps inside
<BrowserRouter>
):let Path = () => <div> {location.pathname}</div>
then
import { connect } from redux
andPath = connect()(Path)
Then
<Path />
will no longer update itself when you change url. Why and how to solve it?I don't really need to have everything stored inside redux store like suggested in
react-router-addons-controlled
. Just want redux to work with components that has its own state.The text was updated successfully, but these errors were encountered: