Tsallaka zuwa abun ciki
Justice Tech School

Event Bubbling

Events bubble to parents. stopPropagation stops that.

Example
<div onClick={() => console.log("parent")}>
  <button onClick={(e) => { e.stopPropagation(); console.log("child"); }}>Go</button>
</div>;

Exercise

Stop it.

e.()

Quiz Test

What does bubbling mean?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.