Data Fetching with React Query A Crash Course
summary
Shows a working CodeSandbox todo app that uses useQuery to fetch and cache to-dos and useMutation to add or clear items, with onSuccess handlers that invalidates cache and refetches—no Redux actions/reducers or useEffect boilerplate. Demonstrates retries, refetch-on-focus, devtools, SSR hydration, pagination (keepPreviousData), offline/localStorage queuing, cancelable requests, parallel queries via useQueries, and documented testing patterns; the example runs and updates the UI as expected.
AI-written summary · about
chapters (7)
- 0:00Introduction
- 1:09What is React Query
- 3:16Custom hooks useQuery
- 8:12useMutation for updates
- 12:51Live code sandbox demo
- 16:24Advanced React Query features
- 20:17Closing and resources
related talks
11mSimple data fetching with React Query
11mData fetching made easy
52mManaging Remote State in React
25mReact Query Under the Hood
26mData Fetching Unleashed: Next.js, React Query and their BFF
41mReact Query: The Next Big Library?
20mReact Query API Design – Lessons Learned
27mLet's Build React Query in 150 Lines of Code!
