From c8aa8f2aaca85941416516d60123ad91e5c80717 Mon Sep 17 00:00:00 2001 From: Jun Santilla Date: Wed, 4 Jan 2023 17:44:57 +0800 Subject: [PATCH] Add import useState (#1906) --- react.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/react.md b/react.md index 7626e5adfe..9a0d57a6c6 100644 --- a/react.md +++ b/react.md @@ -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);