~/talk

Spin the wheel: building a truly reusable composable

Talkat vuejs.de Conf 2022 · on Wednesday, 2022-10-05· [vue, frontend-architecture]
slides:none on file

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

  1. 0:00Introduction to composables
  2. 5:38Live coding setup
  3. 11:45Creating first composable
  4. 18:42Debugging and refining
  5. 22:15Testing with multiple APIs
  6. 27:47Conclusion and Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.