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.

Redux is Overhyped

2 pointsby shakibaover 8 years ago

2 comments

ng12over 8 years ago
&gt; Is it easy to replace Redux with another state-container or data-storage without updating entire app?<p>Yes. This is why I use Redux. All the other stuff like reproducibility, state persistence, and devtools are just icing on the cake.<p>Redux heavily encourages architectures where the vast majority of your app has no knowledge of how data is stored, fetched, or updated. I purposely architect everything so that Redux would be easy to remove -- not that I actually plan on doing it, but it&#x27;s a good litmus test that my architecture is properly data-agnostic. The end outcome is that the majority of the code is &quot;pure&quot; -- that is reusable, composable, and predictable. It&#x27;s also immediately obvious which code actually touches state (namely actions, reducers, and containers).
lioetersover 8 years ago
This reminds me of a recent article by the author of Redux, who wrote [&quot;You might not need Redux&quot;](<a href="https:&#x2F;&#x2F;medium.com&#x2F;@dan_abramov&#x2F;you-might-not-need-redux-be46360cf367" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;@dan_abramov&#x2F;you-might-not-need-redux-be4...</a>). It was refreshing how he emphasized that Redux is just an implementation of a design pattern (or a composition of a few), that it&#x27;s not necessarily &quot;the solution&quot;. If another state management library works better for some applications, then use that instead.<p>&quot;Overhyped&quot; implies that its popularity is not worth its value. It&#x27;s clear that it has proven its value to a majority of developers working with React. Especially as applications grow larger, I&#x27;ve found that using Redux provides an intuitive pattern for sane state management.<p>It does have its pain points (verbosity, async actions) but there&#x27;s a plethora of libraries one could choose from, depending on need and preference. Since the core functions are so simple, they can be adapted as needed - for example, in a recent project I wrote a wrapper (~20 lines) to extend actions and reducers with namespaces.<p>An additional advantage of Redux, I think, is that it&#x27;s becoming widely adopted, so when I look at an open-source codebase built on React + Redux, it&#x27;s so easy to understand the application architecture.
评论 #12842342 未加载