Created
January 27, 2021 15:47
-
-
Save luistak/2f25a86b14beb105a4fcfd84d878c980 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
const { worky } = window; | |
function App() { | |
const handleSubmit = (e) => { | |
e.preventDefault(); | |
const { target: form } = e; | |
const input = form?.elements?.something; | |
worky.say(input.value); | |
form.reset(); | |
} | |
return ( | |
<div className="MF"> | |
<h3>Microfrontend 2️⃣</h3> | |
<p>⌨️ Use this form to communicate with the other microfrontend</p> | |
<form onSubmit={handleSubmit}> | |
<input type="text" name="something" placeholder="Type something in here"/> | |
<button type="submit">Communicate!</button> | |
</form> | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment