Commit 5c9f2ad
authored
Update queueing-a-series-of-state-updates.md
## Update React Docs: State Updater Function Example
### Summary
This PR improves the clarity of the documentation regarding the use of state updater functions in React. The previous wording was slightly ambiguous, and this revision makes the explanation more precise.
### Changes
- Updated the sentence:
**Before:** "To update some state multiple times in one event, you can use `setNumber(n => n + 1)` updater function."
**After:** "To update some state multiple times in one event, you can use an updater function like `setNumber(n => n + 1)`."
### Rationale
- Introduces **"an updater function"** before the example for better readability.
- Ensures consistency with React documentation standards.
- Improves comprehension for new developers.1 parent fc29603 commit 5c9f2ad
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
267 | | - | |
| 267 | + | |
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
| |||
600 | 600 | | |
601 | 601 | | |
602 | 602 | | |
603 | | - | |
| 603 | + | |
0 commit comments