2 Replies
Hi @LordGhandi. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Short answer: Yes, Pinia works with Nuxt 4.
- Nuxt’s docs show Pinia as the recommended state management solution and provide an example using the @pinia/nuxt module in Nuxt 4 (State Management).
- The migration guide explicitly recommends Pinia in place of Vuex for Nuxt 4 and shows how to install and configure @pinia/nuxt (Migration > Configuration > Vuex). Note: There was a specific build issue reported with Pinia 3.x and Nuxt 4 when using the pages directory, which was worked around by transpiling vue-router in build config; the issue is closed now (Issue 32655). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
- The migration guide explicitly recommends Pinia in place of Vuex for Nuxt 4 and shows how to install and configure @pinia/nuxt (Migration > Configuration > Vuex). Note: There was a specific build issue reported with Pinia 3.x and Nuxt 4 when using the pages directory, which was worked around by transpiling vue-router in build config; the issue is closed now (Issue 32655). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
<@358749735323959308> Kapa.ai is still learning and improving, please let me know how I did by reacting below.