Created
March 31, 2020 10:57
-
-
Save abdelfattah-atef94/4db2becbb8ef58672244a97b632a08e7 to your computer and use it in GitHub Desktop.
This file contains 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() { | |
const [inputValue, setInputValue] = useState(""); | |
const handleSubmitButton = () => { | |
alert(inputValue); | |
}; | |
return ( | |
<div className="App"> | |
<input value={inputValue} onChange={e => setInputValue(e.target.value)} /> | |
<input type="submit" value="submit" onClick={handleSubmitButton} /> | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment