Created
November 1, 2020 01:43
-
-
Save neomatrixcode/76f5d140e6d4e46b93244d92f47efa5c 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 from 'react' | |
const agregarTareaPresentational = ({ fusion_agregarTarea }) => { | |
let input | |
return ( | |
<div> | |
<form onSubmit={e => { | |
e.preventDefault() | |
if (!input.value.trim()) { | |
return | |
} | |
fusion_agregarTarea(input.value) | |
input.value = '' | |
}}> | |
<input ref={node => input = node} /> | |
<button type="submit"> | |
Agregar tarea | |
</button> | |
</form> | |
</div> | |
) | |
} | |
export default agregarTareaPresentational |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment