Skip to content

Commit ed3e0cc

Browse files
committed
Capitalize State in useState.md
1 parent c700d01 commit ed3e0cc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/content/reference/react/useState.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ h1 { display: block; margin: 10px; }
420420
421421
### Updating objects and arrays in state {/*updating-objects-and-arrays-in-state*/}
422422
423-
You can put objects and arrays into state. In React, state is considered read-only, so **you should *replace* it rather than *mutate* your existing objects**. For example, if you have a `form` object in state, don't mutate it:
423+
You can put objects and arrays into state. In React, State is considered read-only, so **you should *replace* it rather than *mutate* your existing objects**. For example, if you have a `form` object in state, don't mutate it:
424424
425425
```js
426426
// 🚩 Don't mutate an object in state like this:
@@ -1165,7 +1165,7 @@ function handleClick() {
11651165
}
11661166
```
11671167
1168-
This is because [states behaves like a snapshot.](/learn/state-as-a-snapshot) Updating state requests another render with the new state value, but does not affect the `count` JavaScript variable in your already-running event handler.
1168+
This is because [State behaves like a snapshot.](/learn/state-as-a-snapshot) Updating state requests another render with the new state value, but does not affect the `count` JavaScript variable in your already-running event handler.
11691169
11701170
If you need to use the next state, you can save it in a variable before passing it to the `set` function:
11711171

0 commit comments

Comments
 (0)