Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Beta]: docs(cn): updating-arrays-in-state #654

Merged
merged 16 commits into from
Feb 15, 2023

Conversation

yliaz
Copy link
Contributor

@yliaz yliaz commented Nov 8, 2021

完成初稿。

@takeItIzzy
Copy link
Contributor

流水线挂了貌似

beta/src/pages/learn/updating-arrays-in-state.md Outdated Show resolved Hide resolved
beta/src/pages/learn/updating-arrays-in-state.md Outdated Show resolved Hide resolved
beta/src/pages/learn/updating-arrays-in-state.md Outdated Show resolved Hide resolved
beta/src/pages/learn/updating-arrays-in-state.md Outdated Show resolved Hide resolved
beta/src/pages/learn/updating-arrays-in-state.md Outdated Show resolved Hide resolved
beta/src/pages/learn/updating-arrays-in-state.md Outdated Show resolved Hide resolved
beta/src/pages/learn/updating-arrays-in-state.md Outdated Show resolved Hide resolved
beta/src/pages/learn/updating-arrays-in-state.md Outdated Show resolved Hide resolved
beta/src/pages/learn/updating-arrays-in-state.md Outdated Show resolved Hide resolved
beta/src/pages/learn/updating-arrays-in-state.md Outdated Show resolved Hide resolved
beta/src/pages/learn/updating-arrays-in-state.md Outdated Show resolved Hide resolved
beta/src/pages/learn/updating-arrays-in-state.md Outdated Show resolved Hide resolved
beta/src/pages/learn/updating-arrays-in-state.md Outdated Show resolved Hide resolved
beta/src/pages/learn/updating-arrays-in-state.md Outdated Show resolved Hide resolved
beta/src/pages/learn/updating-arrays-in-state.md Outdated Show resolved Hide resolved
beta/src/pages/learn/updating-arrays-in-state.md Outdated Show resolved Hide resolved
beta/src/pages/learn/updating-arrays-in-state.md Outdated Show resolved Hide resolved
beta/src/pages/learn/updating-arrays-in-state.md Outdated Show resolved Hide resolved
beta/src/pages/learn/updating-arrays-in-state.md Outdated Show resolved Hide resolved
@@ -1597,7 +1597,7 @@ ul, li { margin: 0; padding: 0; }

<Solution>

With Immer, you can write code in the mutative fashion, as long as you're only mutating parts of the `draft` that Immer gives you. Here, all mutations are performed on the `draft` so the code works:
通过使用 Immer,只要你仅仅直接修改 Immer 提供给你的 `draft` 的一部分,你就可以以 mutation 的方式写代码。这里所有的 mutation 都在 `draft` 上执行,因此代码可以正常运行:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这句其实我还是感觉有些不通顺

Co-authored-by: takeItIzzy <[email protected]>
Co-authored-by: Zhu Ye <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants