DEV Community

Discussion on: Explain Event Bubbling Like I'm Five

Collapse
 
thuvvik profile image
thuvvik

Bubbling:
You are in your classroom, and you say to your teacher "I have a headache".
The teacher will tell the director, the director will call the school nurse
The school nurse will handle the situation..

From you to upper in a "hierarchy"... the event information "kid X has a headache" is processed (a bubble in the water would go "up")

Capturing:
Your parents were quite disorganized today, they came back to the school door before lunch, and left your lunchbag (with your name on it) to the director.
The director gives the lunchbag to the teacher.
The teacher gives you your lunchbag.

From upper in the hierarchy to you, the event information "a lunchbag for you" has been processed (given the lunchbag has your name pn it, only you can "capture it"/open it)