OSDN Git Service

Regular updates
[twpd/master.git] / react.md
index 7626e5a..9a0d57a 100644 (file)
--- 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);