Created
March 14, 2020 22:05
-
-
Save batuhansahan/b38e404a9cb88598764882c965b4bc3d to your computer and use it in GitHub Desktop.
hooks4.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, {useState} from 'react' | |
| export default function App(props){ | |
| const [name, setName] = useState('Reactish') | |
| function handleNameChange(e){ | |
| setName(e.target.value) | |
| } | |
| return ( | |
| <div> | |
| <div>Name:</div> | |
| <input | |
| value={name} | |
| onChange={handleNameChange} | |
| /> | |
| </div> | |
| ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment