Course Overview
Version 5 update released!
As of January 2024, this course covers React Query version 5.
--
React Query (also called TanStack Query) has become the go-to solution for server state management in React apps, and for good reason! This smart, comprehensive solution makes it easy to keep your app up-to-date with data on the server.
In fact, if you are using Redux simply to manage data from the server, React Query can replace Redux in your app. And, for server data management, React Query is much simpler and more powerful than Redux. For example, React Query:
tracks loading and error states for your server queries (no need to manage that yourself!)
makes cached server data available for display while you're fetching updated data
This course starts with a simple app to learn the basics of React Query version 3:
queries
loading and error states
React Query dev tools
pagination and pre-fetching
mutations
Then we take a detour with the Star Wars API to learn about Infinite Queries (getting more data just as the user has gotten near the end of the current data).
Finally, we work on a large, multi-component app to learn about the above in more detail, plus
centralizing loading and error handling
filtering data
integrating React Query with auth
ways to keep data up to date after mutations, including optimistic updates
testing React Query
Other notable course features:
pre-written projects to use as a backdrop for React Query, so there's no time wasted writing code not relevant to the course
ample opportunities to practice with periodic "code quizzes" to make sure you're understanding the concepts
visual models for complicated concepts to help understand all of the moving pieces
the major project is written in TypeScript
supportive instructor who loves engaging with students in Q&A
Come see what the hype is about, and improve your apps with simpler, more powerful server state management!
FAQ
FAQ area empty
Course curriculum
-
Introduction to React Query
360 Xem trước -
Introduction to this Course
190 Xem trước -
First project: Blog-em Ipsum
336 Xem trước -
Adding a Query Client and Provider
201 Xem trước -
Creating Queries with useQuery
440 Xem trước -
Handling Loading and Error States
442 Xem trước -
React Query Dev Tools
332 -
StaleTime vs gcTime
513
-
Intro to Code Quizzes
153 Xem trước -
Code Quiz! Create Query for Blog Comments
487 -
Query Keys
399 -
Pagination
341 -
Pre-fetching Data
363 -
IsLoading vs isFetching
336 -
Intro to Mutations
228 -
Delete Post with useMutation
350 -
Other useMutation Properties
379 -
Code Quiz! Mutation to Update Post Title
244 -
Summary: React Query Basics
188
-
Introduction to Infinite Scroll
283 -
CORRECTION: Updated SWAPI address (and alternative to SWAPI)
-
Code Quiz! Set up Infinite SWAPI for React Query
332 -
Intro to useInfiniteQuery
379 -
UseInfiniteQuery Diagram
258 -
Write useInfiniteQuery Call
309 -
InfiniteScroll Component
432 -
TROUBLESHOOTING: page 2 loads twice on initial load!
-
UseInfiniteQuery Fetching and Error states
247 -
Code Quiz! Infinite Species
433 -
Summary: Infinite Scroll
173
-
Intro to Lazy Days Spa App
378 -
Notes on ESLint and Prettier Formatting
-
React Query ESLint plugin!
-
Lazy Days Spa App Code Orientation
313 -
Install React Query
172 -
Set up React Query
282 -
REMINDER: start the server before the next lecture!
-
Custom Query Hook: useTreatments
374 -
Fallback Data
147 -
Centralized Fetching indicator with useIsFetching
278 -
OnError Default for Query Client
321 -
Code Quiz! Custom Hook for useStaff
259 -
Summary: Larger App Setup, Centralization, Custom Hooks
151
-
CORRECTION to the following lecture (useCallback)
-
Filtering Data with the useQuery select Option
505 -
Code Quiz! Selector for useStaff
319 -
Intro to Re-Fetch
343 -
Update Re-Fetch Options
333 -
Global Re-Fetch Options
336 -
Overriding Re-Fetch Defaults and Polling
291 -
Polling: Auto Re-Fetching at an Interval
265 -
Summary: Query Features II
71
-
Introduction to Mutations and Mutations Global Settings
417 -
Custom Mutation Hook: useReserveAppointments
470 -
Invalidating Query after Mutation
314 -
Code Quiz! Mutation to Cancel an Appointment
338 -
Update User and Query Cache with Mutation Response
378 -
Subtle Issue with User Query Key: Token in Dependency Array
334 -
Intro to Optimistic Updates in React Query
219 -
Writing Optimistic Update
503 -
Summary: Mutations
167
-
Intro to Testing React Query
128 -
Testing Setup, including Mock Service Worker
363 -
Query Client and Provider in Tests
496 -
Testing Rendered Query Data
192 -
Code Quiz! Test Rendered Staff Data
214 -
Testing Query Errors
565 -
Testing Mutations
429 -
Intro to Testing Custom Hooks
133 -
Test Appointments Filter
543 -
Code Quiz! Test Staff Filter
199 -
Summary: Testing React Query
155
Requirment
-
Experience with React
-
Familiarity with React Hooks
-
For the testing portion, basic familiarity with Testing Library syntax
Outcomes
-
React Query version 5 queries, mutations, and cache control
-
Using React Query for pagination, infinite scroll, and optimistic updates
-
Integrating React Query with Authentication
-
Testing React Query
0 Student
1 Course
0 review