You are using useFetch WRONG! (I hope you don't)

Description
💪🏻 useFetch is a mighty composable to fetch data in your Nuxt.js application. It can do so many things, from updating state to refreshing calls easily and even data caching is possible. But often I see that people misuse useFetch because it is so tempting to use all the features, even when you shouldn't. In this video I show the most common mistake with useFetch and what to use instead! Key points: 🤔 A demo application with a common mistake - can you spot it before? ✅ How to fix the bug 2️⃣ Approaches to avoid that useFetch mistake Links: 📺 Is your function really a composable? https://www.youtube.com/watch?v=N0QrFKBZuqA 🔗 ofetch ($fetch in Nuxt): https://github.com/unjs/ofetch 🔗 useFetch docs: https://v3.nuxtjs.org/examples/composables/use-fetch/#usefetch Don't forget to hit that "Subscribe" button, ring the notification bell and give a thumbs up! 🌐 Connect further: Website: https://www.lichter.io Twitter/X: https://twitter.com/TheAlexLichter Twitch: https://www.twitch.tv/TheAlexLichter Chapters: 00:00 Intro 00:50 Demo application overview 01:51 Submitting the form 02:14 The issue pops up 02:40 Explaining the issue 04:42 First solution 06:21 How the issue is caused 07:43 Second solution 09:44 My rule of thumb 10:29 Outro