Introduction
Component events let parts of your app talk to each other. createEventDispatcher helps a child component send messages to its parent.
You want a button component to tell its parent when it is clicked.
A form component needs to send the entered data back to the main app.
A custom input component should notify the parent when its value changes.
You want to keep components separate but still let them communicate easily.