arrow_backBACK TO DRILLS
Blue Belt - Mediumusememo-usecallback

Updater function removes callback dependency

A memoized callback uses todos only to compute the next state. Why can replacing setTodos([...todos, newTodo]) with setTodos(t => [...t, newTodo]) remove todos from dependencies?