~/talk

Advanced Patterns for API Management in Large-Scale React Applications

Talkat React Advanced 2021 · 2021-10-22..10-23· [react, frontend-architecture]
slides:none on file

An API layer centralizes requests so components stay unchanged when swapping axios for firebase, and an exported set of methods preserves input/output contracts. A useApiStatus single-state pattern replaces many boolean flags with idle/pending/success/error. A composable withAbort wrapper using axios cancel token lets code store a canceler in a ref and actually abort prior requests, and integration with React Query supports cancellation by exposing a promise cancel property; the hooks and patterns are implemented and shown working.

AI-written summary · about

  1. 0:00Introduction to API management
  2. 1:23Implementing the API layer
  3. 6:06Managing API states
  4. 10:29Custom hook implementation
  5. 12:44Request cancellation with Axios
  6. 17:21API layer with React Query
  7. 18:53Conclusion and resources
~/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.