I don't think that linking Redux with router is a good practice. I think it is much closer to presentational data and presentational data belongs to component state. That's why I would never put form state to Redux state.
What lies in redux store is widely use data, it could be some application state (login state, sidebar visibility state, current route - routing)
What lies in component state is the state of this said component.
If i'm extrapolating your point, if I have flag which tells me if the sidebar is open (pure presentational data) I have to store it in the state of the top level component and pass the value or/and the update function for this value for all the components that need it ?
Basically yes. It's a separation of concerns - presentational data are not mixed with app data. Altough it could also be achieved using separate redux store.
But this is just my opinion, not a definitive answer to app state management. Clearly there is a lot of ways and what's important is that everything stays clear and easy to maintain/develop/debug.
We're a place where coders share, stay up-to-date and grow their careers.
I don't think that linking Redux with router is a good practice. I think it is much closer to presentational data and presentational data belongs to component state. That's why I would never put form state to Redux state.
What lies in redux store is widely use data, it could be some application state (login state, sidebar visibility state, current route - routing)
What lies in component state is the state of this said component.
If i'm extrapolating your point, if I have flag which tells me if the sidebar is open (pure presentational data) I have to store it in the state of the top level component and pass the value or/and the update function for this value for all the components that need it ?
Basically yes. It's a separation of concerns - presentational data are not mixed with app data. Altough it could also be achieved using separate redux store.
But this is just my opinion, not a definitive answer to app state management. Clearly there is a lot of ways and what's important is that everything stays clear and easy to maintain/develop/debug.