TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

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

2 pointsby johnmwover 8 years ago
Hi HN,<p>I&#x27;m comfortable with basic Javascript but I am new to the larger npm ecosystem. I have been suffering &#x27;Javascript fatigue&#x27; working out what libraries and technologies to use.<p>In the end I chose the React path.<p>I found &#x27;create-react-app&#x27; a great way to get started that initially hides much of the tooling complexity from you. [1]<p>I found &#x27;redux&#x27; a fantastic way to manage state. [2]<p>But things became less clear when it came to routing. The first options I could see were:<p>1. Roll your own. However routing is such a common requirement I&#x27;d much rather find a library than reinvent the wheel and deal with things like cross browser issues myself.<p>2. Use react-router [3]. This appears to be the standard React routing solution and I was going to use this initially.<p>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.<p>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].<p>The argument is pretty convincing and it seems react-little-router is the way to go? But it is a lot less popular.<p>I&#x27;m hoping some of those who are more experienced in React and Redux than me will weigh in with some thoughts and advice.<p>Thanks in advance.<p>[1] https:&#x2F;&#x2F;github.com&#x2F;facebookincubator&#x2F;create-react-app<p>[2] http:&#x2F;&#x2F;redux.js.org&#x2F;<p>[3] https:&#x2F;&#x2F;github.com&#x2F;ReactTraining&#x2F;react-router<p>[4] https:&#x2F;&#x2F;formidable.com&#x2F;blog&#x2F;2016&#x2F;07&#x2F;11&#x2F;let-the-url-do-the-talking-part-1-the-pain-of-react-router-in-redux&#x2F;<p>[5] https:&#x2F;&#x2F;github.com&#x2F;FormidableLabs&#x2F;redux-little-router

1 comment

acemarkeover 8 years ago
React-Router is certainly the most widely used option, and the v4 &quot;just components&quot; API _may_ make it work nicer with Redux. Dan Abramov certainly seems to like the direction the API is taking.<p>That said, there&#x27;s definitely other options. I keep a list of Redux-related addons and utilities, and have a page listing Redux+routing libs: <a href="https:&#x2F;&#x2F;github.com&#x2F;markerikson&#x2F;redux-ecosystem-links&#x2F;blob&#x2F;master&#x2F;routing.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;markerikson&#x2F;redux-ecosystem-links&#x2F;blob&#x2F;ma...</a> .<p>I&#x27;ve never actually done any client-side routing in my own apps, so that&#x27;s just a list of stuff I&#x27;ve found and categorized, but hopefully it&#x27;s useful for you.<p>You may also be interested in my list of links to high-quality tutorials and articles on React, Redux, and related topics, at <a href="https:&#x2F;&#x2F;github.com&#x2F;markerikson&#x2F;react-redux-links" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;markerikson&#x2F;react-redux-links</a> . Tons of useful info linked from there.