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
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.