Spin the wheel: building a truly reusable composable
summary
Builds a single useApi composable that accepts a getResults function and a query value, extracts and normalises responses, and exposes loading / error / result refs; demos with three live APIs (TheCatAPI, Dog API, SpaceX GraphQL) using axios GET and axios POST for GraphQL, shows the exact response fields mapped (cats: data[0].url, dogs: data.message, ships: data.data.ships[0].image), and the live coding succeeds end to end.
AI-written summary · about
chapters (10)
- 0:00Intro
- 2:57Composition API
- 4:00Reactive State API
- 4:27Flexible API
- 7:52Cats API
- 8:08Spin the wheel
- 8:45Fetching images
- 16:00Logic to colon
- 16:18Copy paste logic
- 19:50Add second api
related talks
29mSpin the wheel: building a truly reusable composable
30mVueConf US 2021 | The Vue 3 Composition API
37mAll you need is l̶o̶v̶e Apollo Client
01h 00mArchitecting Data-Driven Apps for UX Success
26mData Fetching Unleashed: Next.js, React Query and their BFF
47mFunctional Programming for Everyday Work: Myth or Reality?
41mDemand Driven Applications with GraphQL by Vinci Rufus
33mComposition
