Hacker News new | past | comments | ask | show | jobs | submit login

One use case of having URL in the state (from the lib's README: https://github.com/jlongster/redux-simple-router) is that you can snapshot/serialize the app state, and load it up later and see the same thing. This can be useful for development and debugging.

It's also worth mentioning that this lib also provides a really useful action creator- updatePath(). It allows you to navigate from other action creators, for example, in response to a successful AJAX call. You could achieve that a couple other ways as well, but this is the simplest/cleanest way I've seen so far.




Thanks. updatePath is actually something I've been missing so that's great.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: