Merge pull request #906 from jussiry/patch-1

react todo example: fixes input clear on submit
This commit is contained in:
Mark Nadal
2020-04-06 21:35:06 -07:00
committed by GitHub

View File

@@ -26,7 +26,7 @@
<form onSubmit={e => {
e.preventDefault();
gun.get("todos").set({ title: newTodo.current.value });
ref.current.value = ''
newTodo.current.value = ''
}}>
<input ref={newTodo} placeholder="new todo"/>
</form>