--- title: Component events --- Components can also dispatch events. To do so, they must create an event dispatcher. Update `Inner.svelte`: ```html ``` > `createEventDispatcher` must be called when the component is first instantiated — you can't do it later inside e.g. a `setTimeout` callback. This links `dispatch` to the component instance.