arrow_backBACK TO DRILLS
White BeltimmutabilityPREMIUM
Removing items immutably
A todo list removes items using:
REACT_MODULE // 0x42
setTodos(todos.filter(t => t.id !== todoId));What does filter() help React achieve here?