(e)
| 25 | |
| 26 | //functions for the To-Do list |
| 27 | function handleSubmitToDo(e) { |
| 28 | e.preventDefault(); |
| 29 | |
| 30 | if (value.length > 0) { |
| 31 | setList(prevListArray => { |
| 32 | return [...prevListArray, {id: count.current, task: value}]; |
| 33 | }); |
| 34 | |
| 35 | count.current = count.current + 1; |
| 36 | } |
| 37 | setValue(''); //clears text field on submit |
| 38 | } |
| 39 | |
| 40 | function updateCompleted(complete) { |
| 41 | setCompleted(prevListArray => { |
nothing calls this directly
no test coverage detected