Aliaksandr
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
src/content/reference/react/useState.md
|
@ -7,7 +7,7 @@ title: useState |
|
|
`useState` is a React Hook that lets you add a [state variable](/learn/state-a-components-memory) to your component. |
|
|
`useState` is a React Hook that lets you add a [state variable](/learn/state-a-components-memory) to your component. |
|
|
|
|
|
|
|
|
```js |
|
|
```js |
|
|
const [state, setState] = useState(initialState) |
|
|
const [state, setState] = useState(initialState); |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
</Intro> |
|
|
</Intro> |
|
|