event API refract

using optimistic updates
This commit is contained in:
cv
2021-04-11 21:30:24 +02:00
parent 964bdf0d2a
commit 3db40be8a8
5 changed files with 144 additions and 26 deletions
@@ -10,6 +10,7 @@ export default function EditableTimer(props) {
// prepare time fields
useEffect(() => {
if (time == null) return;
setValue(addAndFormat(time, delay));
}, [time, delay]);