4 ms·
`updatePath` is an action creator, and there's a PR to rename it to `pushPath` and add `replacePath`. And you shouldn't access route params outside of a router
by jlongster 11y ago
`updatePath` is an action creator, and there's a PR to rename it to `pushPath` and add `replacePath`. And you shouldn't access route params outside of a router component anyway.
(EDIT: ok, the last statement was a simplification. But generally you don't need to, but you could manually move data into the state if you needed to)
- theduro 11y agoI get that, but still no access to params and the ability to change them is still a boon for me. I often will use stand to store some basic state for deep linking certain views. For example a data grid and the sort or filter options. I was able to very elegantly execute this with redux-router and its full exposure of the entire route object and API pairity to pushState and replaceState
- jlongster 11y agoThat's great! Keep using redux-router then. I think you'd find that there's another pattern that works too, but there are multiple ways to do it.