mirror of
https://github.com/amark/gun.git
synced 2025-06-08 07:06:44 +00:00
Merge pull request #906 from jussiry/patch-1
react todo example: fixes input clear on submit
This commit is contained in:
commit
2f34d8cb4e
@ -26,7 +26,7 @@
|
|||||||
<form onSubmit={e => {
|
<form onSubmit={e => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
gun.get("todos").set({ title: newTodo.current.value });
|
gun.get("todos").set({ title: newTodo.current.value });
|
||||||
ref.current.value = ''
|
newTodo.current.value = ''
|
||||||
}}>
|
}}>
|
||||||
<input ref={newTodo} placeholder="new todo"/>
|
<input ref={newTodo} placeholder="new todo"/>
|
||||||
</form>
|
</form>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user