arrow_backBACK TO DRILLS
White BeltimmutabilitylockPREMIUM

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?

lock

This Drill is Locked

This is a premium drill. Continue on to the next free drill in the sequence.

CONTINUE DRILLarrow_forward
BugDojo
BlogFAQ

© 2026. Carved in code.