Skip to content

Commit

Permalink
docs(cn): Fix an inaccurate translation (#1633)
Browse files Browse the repository at this point in the history
  • Loading branch information
loveloki authored Dec 6, 2024
2 parents 339b3ef + e2b9ec4 commit 33725f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/content/learn/lifecycle-of-reactive-effects.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ function ChatRoom({ roomId }) { // roomId 属性可能会随时间变化。

### 每个 Effect 表示一个独立的同步过程。 {/*each-effect-represents-a-separate-synchronization-process*/}

抵制将与 Effect 无关的逻辑添加到已经编写的 Effect 中,仅仅因为这些逻辑需要与 Effect 同时运行。例如,假设你想在用户访问房间时发送一个分析事件。你已经有一个依赖于 `roomId` 的 Effect,所以你可能会想要将分析调用添加到那里:
不要仅仅因为某个逻辑需要和你已经写好的 Effect 一起运行,就将它添加到 Effect 。例如,假设你想在用户访问房间时发送一个分析事件。你已经有一个依赖于 `roomId` 的 Effect,所以你可能会想要将分析调用添加到那里:

```js {3}
function ChatRoom({ roomId }) {
Expand Down

0 comments on commit 33725f5

Please sign in to comment.