Spin the wheel: building a truly reusable composable
summary
Live codes a reusable fetch utility for Vue 3 that ends up as a useFetch composable which returns loading, error and result and accepts a user-supplied request function instead of a URL. Uses axios and demonstrates REST (cats, dogs) and GraphQL (Rick and Morty) endpoints, shows data shaping left to the caller, and explains how moving state outside the factory makes it shared vs per-instance state. It mostly works after a few on-stage debugging passes.
AI-written summary · about
chapters (6)
- 0:00Introduction to composables
- 5:38Live coding setup
- 11:45Creating first composable
- 18:42Debugging and refining
- 22:15Testing with multiple APIs
- 27:47Conclusion and Q&A
related talks
30mSpin the wheel: building a truly reusable composable
46mComposable Vue 3
50mVue.js - Power and Flexibility
22mYou might not need Vuex
23mHandling Data at Scale for React Developers
21mSimplifying Data Fetching in Vue with Data Loaders
36mVue 3 | Looking into the Vueture: Composition Functions
21mModern State Management with Vue 3
