Add import useState (#1906)

This commit is contained in:
Jun Santilla 2023-01-04 17:44:57 +08:00 committed by GitHub
parent 66b6648e49
commit c8aa8f2aac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -341,6 +341,8 @@ See: [Hooks at a Glance](https://reactjs.org/docs/hooks-overview.html)
### Declaring multiple state variables
```jsx
import React, { useState } from 'react';
function ExampleWithManyStates() {
// Declare multiple state variables!
const [age, setAge] = useState(42);