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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Immer: Create the next immutable state tree by simply modifying the current tree

3 点作者 potench大约 7 年前

1 comment

acemarke大约 7 年前
I&#x27;m a Redux maintainer, and I can vouch for this.<p>It&#x27;s a pretty neat project. I&#x27;ve seen literally dozens of JS immutable update utility libraries, and Immer is the best one I&#x27;ve seen in terms of API, simplicity, and being able to write &quot;normal&quot; code.<p>It&#x27;s racked up over 3000 stars so far, and that seems well deserved. I finally had a chance to play with it myself for the first time this last week, and it seems to work as advertised.<p>I think it&#x27;s a great solution to help simplify immutable state updates, especially in Redux reducers. In fact, I just published a small package that, among other things, uses Immer as part of a `createReducer()` lookup table utility ( <a href="https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;@acemarke&#x2F;redux-starter-kit" rel="nofollow">https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;@acemarke&#x2F;redux-starter-kit</a> ). We&#x27;re hoping to eventually turn that into an official Redux &quot;simple setup&quot; package.