Created
November 15, 2018 10:38
-
-
Save zapkub/eb40a5c31438a8bc61a9bc4b151e91c4 to your computer and use it in GitHub Desktop.
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
// TodoInput.jsx | |
const TodoInput = () => { | |
const [textInput, setTextInput] = React.useState(""); | |
function onTextChange(e) { | |
setTextInput(e.target.value); | |
} | |
return ( | |
<input className="new-todo" value={textInput} onChange={onTextChange} /> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment