Skip to content

Commit 674c086

Browse files
authored
Merge pull request #4176 from PeterKementzey/patch-1
Update explanation of React state updates
2 parents 3d3d065 + 56f65cc commit 674c086

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/1/en/part1d.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ Even though a new value was set for _left_ by calling _setLeft(left + 1)_, the o
315315
setTotal(left + right)
316316
```
317317

318-
The reason for this is that a state update in React happens [asynchronously](https://react.dev/learn/queueing-a-series-of-state-updates), i.e. not immediately but "at some point" before the component is rendered again.
318+
The reason for this is that a state update in React happens [asynchronously](https://react.dev/learn/queueing-a-series-of-state-updates), i.e. not immediately but "at some point" after the current component function is finished, before the component is rendered again.
319319

320320
We can fix the app as follows:
321321

0 commit comments

Comments
 (0)