Skip to content

Commit

Permalink
Add import useState (rstacruz#1906)
Browse files Browse the repository at this point in the history
  • Loading branch information
junsantilla authored Jan 4, 2023
1 parent 66b6648 commit c8aa8f2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions react.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c8aa8f2

Please sign in to comment.