4 ms·
They don't load a routing solution with this, but the most used router (and my favorite) is React-Router [0]. To get basic routing setup takes less than an hour
by kotojo 9y ago
They don't load a routing solution with this, but the most used router (and my favorite) is React-Router [0]. To get basic routing setup takes less than an hour, and has great docs.
[0]: https://reacttraining.com/react-router https://reacttraining.com/react-router
- celim307 9y agofor v4 I feel like the docs aren't all the way there. especially example wise
- idbehold 9y agoIf you're using redux I would recommend you stay far away from react-router. Using redux-little-router has been a pleasure to use in comparison: https://github.com/FormidableLabs/redux-little-router https://github.com/FormidableLabs/redux-little-router
- elzi 9y agoDamn, this does look great. A lot of what it does can be solved by using `withRouter` from react-router, but I really like how they use `<Fragment />`
- mhink 9y ago(Disclaimer: I work at Formidable) Can confirm, I absolutely love `redux-little-router`. It feels so natural to dispatch Redux actions to change routes rather than dealing with the song and dance of conditionally rendering <Redirect /> components or trying to figure out when in the lifecycle to call `router.push(url)`. I especially like pairing it with `redux-saga`- with a little bit of effort, you can end up writing mini-applications for each route which start and stop as the user navigates.
- elzi 9y agoAny example repos of this? This sounds fantastic.
- arrowoode 9y agoDo I need to eject my create-react-app to use Redux and Redux-Little-Router?