Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save neomatrixcode/76f5d140e6d4e46b93244d92f47efa5c to your computer and use it in GitHub Desktop.
Save neomatrixcode/76f5d140e6d4e46b93244d92f47efa5c to your computer and use it in GitHub Desktop.
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