arrow_backBACK TO DRILLS
Blue Belt - MediumusereflockPREMIUM

Manual DOM removal conflict

A component renders <p ref={ref}>Hello</p> conditionally with state, but also has a button that calls ref.current.remove() directly. Later, toggling the state causes errors. What is the root issue?

lock

This Drill is Locked

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