Ask HN: Is redux-little-router the best router option to use with redux?

https://news.ycombinator.com/item?id=12625199
by johnmw • 10 years ago
2 1 10 years ago

Hi HN,

I'm comfortable with basic Javascript but I am new to the larger npm ecosystem. I have been suffering 'Javascript fatigue' working out what libraries and technologies to use.

In the end I chose the React path.

I found 'create-react-app' a great way to get started that initially hides much of the tooling complexity from you. [1]

I found 'redux' a fantastic way to manage state. [2]

But things became less clear when it came to routing. The first options I could see were:

1. Roll your own. However routing is such a common requirement I'd much rather find a library than reinvent the wheel and deal with things like cross browser issues myself.

2. Use react-router [3]. This appears to be the standard React routing solution and I was going to use this initially.

But then I saw the negative reaction to react-router version 4. It seems there is still quite a bit of churn going on with this library.

Secondly I saw a post [4] that react-router is not the best solution if you use redux and that a more suitable library exists called react-little-router [5].

The argument is pretty convincing and it seems react-little-router is the way to go? But it is a lot less popular.

I'm hoping some of those who are more experienced in React and Redux than me will weigh in with some thoughts and advice.

Thanks in advance.

[1] https://github.com/facebookincubator/create-react-app

[2] http://redux.js.org/

[3] https://github.com/ReactTraining/react-router

[4] https://formidable.com/blog/2016/07/11/let-the-url-do-the-talking-part-1-the-pain-of-react-router-in-redux/

[5] https://github.com/FormidableLabs/redux-little-router

Related Stories

Loading related stories...

Source preview

news.ycombinator.com