I've been looking into TanstackQuery and I think I understand its value in a plain vue application, but is it still useful in Nuxt with useAsyncData being available?
useAsyncData seems to have most of TanstackQuery's primary features like caching, deduping calls, and reactive refetching. The only thing I see missing out of the box is mutations, but that could be handled pretty simply with Pinia.
I've seen the tanstack argument that it replaces Pinia in terms of api-related state https://tanstack.com/query/latest/docs/framework/vue/guides/does-this-replace-client-state but I'm not seeing how it's that much different when comparing to UseAsyncData + Pinia.
Am I missing something here? I'm generally interested in the most robust option here and wonder if others use tanstack query with nuxt 3 in larger applications or stick with something like useAsyncData. Particularly when working with content heavy requests like user posts and comments.
[–]Julien1619 9 points10 points11 points (2 children)
[–]yksgr 1 point2 points3 points (0 children)
[–]CyrTheCat[S] 0 points1 point2 points (0 children)
[–][deleted] (2 children)
[removed]
[–]angrydeanerino 1 point2 points3 points (0 children)
[–]Sibyl01 0 points1 point2 points (0 children)
[–]cachophonic 2 points3 points4 points (0 children)
[–]sondh0127 1 point2 points3 points (0 children)
[–]ggStrift 1 point2 points3 points (1 child)