Why do we need createEventDispatcher?

✨❓ Svelte Question Time ❓✨ “You have a Svelte question, I have an answer“ 😱😍 Why do we need createEventDispatcher? When creating component events, why do we have to import createEventDispatcher, create a dispatch function, and use it? Why can’t we import `dispatch` directly and use it? What is happening when we call `createEventDispatcher`? --- 📝 Codesandbox 🎧 Svelte Tutorial for Beginners 🎧 Svelte Question Time 📚 Related Resources Svelte Svelte REPL 🥰 Support me 🔗 Want to learn more from me? Check out these links: Twitter: Blog: Newsletter: #svelte #sveltequestiontime Thanks for watching 🥰 -- with love, Li Hau
Back to Top