You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: react-hooks/src/App.js
+12-2Lines changed: 12 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
importReactfrom'react';
1
+
importReact,{useState}from'react';
2
2
import{Input}from'antd';
3
3
import'antd/es/input/style/index.css';
4
4
import'./App.css';
@@ -8,13 +8,23 @@ import './App.css';
8
8
* In short, you can now use state, and other React features, within your functional React components.
9
9
* So, you don’t need a class to use state!
10
10
* The biggest part to learn about hooks is the new way of declaring state. So as the first part of this app, let’s set up a component with state, the hooks way.
0 commit comments