Don't miss the next edition. Subscribe to the newsletter.
Published at May 12, 2025, 3:00 PMNuxt Data Fetching Improvements Ready for your weekly Vue & Nuxt dose? Weekly Vue News #197 Nuxt Data Fetching Improvements View online Hi 👋 I’m now giving early testers access to my Nuxt Starter Kit ! With the code TN8JDLYO, you’ll get 30% off — that’s a production-ready Nuxt starter kit for around $30. Just a heads-up: you’ll need a Nuxt UI Pro license, since the kit is highly opinionated and tightly integrated with NuxtHub and Nuxt UI Pro. Excited to see some of you supporting my work! Enjoy this issue and have a lovely week ☀️ Vue 📕 How to Use Pinia for State Management in Vue 👉🏻 In this article, you’ll learn how to use Pinia to manage application state in a Vue 3 project — from installation to real-world usage. 📕 Vue.js: Propagating Props Like a Pro 👉🏻 Probably the cleanest way to forward base props from a wrapper component in Vue. 📕 Top AI Tools for Developers 👉🏻 In this article, you’ll explore how you can gain a competitive edge by incorporating AI development tools into your workflow. 📕 Handling internationalisation (i18n) in Vue 👉🏻 This article introduces you to the topic of i18n and show you how you can achieve that in both Vue and Nuxt frameworks. 📕 I cannot live without these VueUse utils 👉🏻 Fayaz shares his most used VueUse utils, some of them are really underrated. Nuxt 📕 Nuxt Showcase 👉🏻 See real world web applications built with Nuxt around the world. 📕 Introducing hubAutoRAG() 👉🏻 Create fully-managed RAG pipelines to power your Nuxt AI applications with accurate and up-to-date information. 💡 Nuxt Tip: Data Fetching Improvements Nuxt 3.17 introduced significant improvements to the data composables useAsyncData useAsyncData and useFetch useFetch . All calls to these composables with the same key now share the underlying refs, ensuring consistency across your application: 1 // 1️⃣ ComponentA.vue 2 const { data: users , pending } = useAsyncData ( ' users ' , fetchUsers ) 3 4 // 2️⃣ ComponentB.vue 5 // This will reference the same data state as ComponentA 6 const { data: users , status } = useAsyncData ( ' users ' , fetchUsers ) 7 // When either component refreshes the data, both will update consistently You can now use computed refs, plain refs, or getter functions as keys: 1 const userId = ref ( ' 123 ' ) 2 const { data: user } = useAsyncData ( 3 computed (() => ` user- ${ userId . value }` ), 4 () => fetchUser ( userId . value ) 5 ) 6 7 // Changing the userId will automatically trigger a new data fetch 8 // and clean up the old data if no other components are using it 9 userId . value = ' 456 ' Multiple components watching the same data source will now trigger only a single data fetch when dependencies change: 1 // In multiple components: 2 const { data } = useAsyncData ( 3 ' users ' , 4 () => $fetch ( ` /api/users?page= ${ route . query . page }` ), 5 { watch : [() => route . query . page ] } 6 ) 7 8 // When route.query.page changes, only one fetch operation will occur 9 // All components using this key will update simultaneously 📅 Events Vueconf.US (19 - 21 May 2025, Tampa, Florida) MadVue (29 May 2025, Madrid, Spain) PragVue (23 September 2025, Czech Republic) VueFes (25 October 2025, Otemachi, Japan) 💬 Quote of the week 🧑🏻💻 In Other News 📕 Categorize Your Dependencies 👉🏻 Anthony Fu explains how he uses named catalogs to categorize dependencies. 📕 14 web performance tips for 2025 👉🏻 This post offers 14 tips on improving your website performance. 📹 How To Detect Memory Leaks In Your Web App 👉🏻 In this video, you will learn the concept of memory leaks in JavaScript and which debugging techniques you can apply to find them. 😂 Fun 🔗 Want more Vue & Nuxt content? More Exclusive Vue Tips : Join Michael Thiessen's newsletter and get great Vue tips and insights delivered to your inbox each week. Weekly Vue & Nuxt Videos : You must subscribe Alexander Lichter's YouTube channel if you are interested in Vue & Nuxt. DejaVue Podcast : A weekly podcast about Vue.js and the ecosystem around it. Comments? Join the discussion about this issue in our Discord community . Until next week, Michael Hoffmann (Curator) To support me: 😘 Recommend the newsletter to your friends: it really helps! 💸 Sponsor this newsletter 🦋 Repost the latest BlueSky post 📨 Reply to this email: feedback is welcome * Some of my links are affiliate links; if you make a purchase, I gain a small percentage at no extra cost. Thank you for supporting my newsletter. Unsubscribe Holzapfelkreuther Str. 19, 81375 Munich, Germany {{ TrackView }}