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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Show HN: Federal – A minimalistic centralized React store

3 点作者 truesy超过 7 年前

2 条评论

fiatjaf超过 7 年前
I agree that Redux is a horrible pain.<p>A week ago I started searching for a simple yet powerful solution for the state problem in React. After trying 3 libraries (Baobab, Cerebral and react-cursor) and discarding without trying a bunch more (Derivable, partial-lenses, Cycle and others), I ended up writing the app in Elm (still doing it).<p>Federal seems like a better Redux, but still too complected[0]. Ideally, I would want something like Baobab (a central store with cursors&#x2F;lenses and event emitters), but with immutable data structures (not Object.freeze) and without the bugs. Since this ideal will never come (and I won&#x27;t write it myself) I&#x27;ll probably use Federal for my next app that could not be written in Elm.<p>[0]: <a href="https:&#x2F;&#x2F;www.infoq.com&#x2F;presentations&#x2F;Simple-Made-Easy" rel="nofollow">https:&#x2F;&#x2F;www.infoq.com&#x2F;presentations&#x2F;Simple-Made-Easy</a>
评论 #15874512 未加载
52-6F-62超过 7 年前
I like the idea. I always wanted something of a &quot;lightweight Redux&quot; (admittedly, I never looked very hard).<p>I&#x27;ll give this a try soon. Thanks for putting in the time.<p>Any attempts at implementing it with TypeScript? Also would love some examples in `class`-y components.