TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Step by Step Guide to Building React Redux Apps

133 点作者 node-bayarea大约 9 年前

6 条评论

afarrell大约 9 年前
If you want a guide to doing this with a &quot;here are some specific libraries we will use today&quot; perspective and automated testing, take a look at <a href="http:&#x2F;&#x2F;teropa.info&#x2F;blog&#x2F;2015&#x2F;09&#x2F;10&#x2F;full-stack-redux-tutorial.html" rel="nofollow">http:&#x2F;&#x2F;teropa.info&#x2F;blog&#x2F;2015&#x2F;09&#x2F;10&#x2F;full-stack-redux-tutorial...</a>
gravitronic大约 9 年前
It&#x27;s really disappointing to me to see Redux being the &quot;defacto standard&quot; for React applications. It&#x27;s overly decoupled for simple applications, which makes it harder to reason about the application. It also doesn&#x27;t help that the Redux codebase itself is hard to understand.<p>It is only a tool you should reach for after you find you need it. Too few developers approach software development with this level of pragmatism and instead we get &quot;use X because it&#x27;s being used&quot;. I guess you need to understand the tool to know when to use it - but that doesn&#x27;t mean it should become the &quot;defacto standard&quot;.<p>Ironically Redux is being coupled with React, which is a great library for structuring UI into components and resulting it simpler to understand code.
评论 #11190575 未加载
评论 #11189673 未加载
评论 #11191049 未加载
评论 #11191160 未加载
评论 #11190834 未加载
评论 #11190437 未加载
评论 #11190299 未加载
akrymski大约 9 年前
Wow what an absolute nightmare to wrap my head around. Reminds me of J2EE days of abstract patterns everywhere just because we can. Talk about simplicity.<p>Here is the same app in 130 lines:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;techlayer&#x2F;espresso.js&#x2F;blob&#x2F;master&#x2F;examples&#x2F;todomvc&#x2F;app.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;techlayer&#x2F;espresso.js&#x2F;blob&#x2F;master&#x2F;example...</a>
评论 #11193472 未加载
jsprogrammer大约 9 年前
The &quot;action creators&quot; from step 4 can be further reduced:<p><pre><code> export const addTodo = text =&gt; ({ type: &#x27;ADD_TODO&#x27;, id: nextTodoId++, text, completed: false }); export const setVisibilityFilter = filter =&gt; ({type: &#x27;SET_VISIBILITY_FILTER&#x27;, filter}); export const toggleTodo = id =&gt; ({type: &#x27;TOGGLE_TODO&#x27;, id});</code></pre>
aldanor大约 9 年前
I think the funniest part is that the <i>total</i> number of meaningful lines in Redux source code is less than 250. Compare that to the supplied documentation with over 6,000 lines of Markdown.<p>If you have any FP background, this is really nothing innovative, more of a common sense kind of thing. With the main achievement being that it&#x27;s trivial enough and has nice documentation with examples so that mass JS programmers can actually grok it...<p>I&#x27;ve nothing against Redux, it&#x27;s a good idea but quite a bit overhyped is all.
评论 #11192163 未加载
iliaznk大约 9 年前
Has anybody tried both Redux and Baobab? If so, do you think Redux is better and why? I&#x27;m using Baobab in a couple of projects and really liking it, but Redux from the tutorial I read seems to a bit too general to me. In Baobab you can subscribe components to their particular branches and only those components will re-render if the branches change.<p>In Redux, it seems to me, there&#x27;s no way you can do it, or at least nothing is provided out of the box. Am i correct?
评论 #11191041 未加载
评论 #11190583 未加载