Pinia Colada: Smooth Data Fetching for Better UX
summary
Pinia Colada is a Vue plugin built on Pinia that provides a small (about 2.5 kilobytes) client-side query system with a centralized query cache and hierarchical keys so multiple components share the same promise instance. It implements fresh/stale timing, prefetching, a delay plugin to avoid flashing spinners, automatic refetch on invalidation, and optimistic updates for instant-feeling writes. The demo shows optimistic edits and background refetches working and the API is nearly stable with devtools support.
AI-written summary · about
chapters (16)
- 0:00Pinia Colada and UX challenges
- 6:44Async state in Vue
- 9:35Pinia Colada core concepts
- 13:48Centralized cache benefits
- 16:16Fresh vs stale data refetch
- 19:03Tricking users for faster UX
- 21:54Delay plugin demo
- 23:40Optimistic updates in Pinia Colada
- 26:31Rollbacks and optimistic updates
- 27:33Extending with plugins
- 28:55UX improvements with Pinia Colada
- 30:22Q&A: Outside Pinia
- 30:42Q&A: Pinia Colada in NX
- 31:26Q&A: Pinia Colada vs Mastering Pinia
- 32:28Q&A: Differences with TanStack Query
- 34:18Closing remarks
related talks
50mClean Async State Management
28mPinia Disasterclass
25mEverything Beyond State Management in Stores with Pinia
48mVUE3 & Pinia A Better Pattern for Global State Management
27mDeep down the rabbit hole of state management and server cache
37mSimplify Data Fetching in Vue with Data Loaders with Q&A
44mData Management in Vue
21mSimplifying Data Fetching in Vue with Data Loaders
