score:1

Accepted answer
setTodoList(prev => {
    let newTodo = [...prev, todoText]
    store.update("todoList", newTodo)
    return newTodo
})
setTodoText("")

Related Query

More Query from same tag