Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
TanStack Query Mastery: From Zero to Advanced [2025 Edition]
Rating: 4.0 out of 5(1 rating)
5 students

TanStack Query Mastery: From Zero to Advanced [2025 Edition]

React Query, TanStack Query, API, React
Created byBabak Mehrabi
Last updated 12/2025
English

What you'll learn

  • Getting Started with React Query and biring it's power into your project
  • Advantages of React Query over state management libraries like Redux
  • Step by step coding to create a full feature todo list app using React Query
  • Complete section for unit and integration testing codes written by React Query

Course content

9 sections51 lectures3h 29m total length
  • Introduction4:30
  • Pre Requirements of this course1:29
  • GitHub repositories0:03
  • How to Work with GitHub Repository2:27

Requirements

  • Basic knowledge of JavaScript and TypeScript
  • Basic knowlege about React and it's concepts

Description

In this course, we are going to learn TanStack Query (React Query). React Query is a powerfull library to work with APIs which provides a lot of useful features like fetching, caching, synchronizing, and, etc.


TanStack (React) Query makes it a lot easier to work with APIs. You can simply fetch data from APIs and send post/patch requests with ReactQuery and make all of the components to be aware of the data changes. Using it will help us to create a fully responsive app that react to user changes and updates the data on the server in the background.


Using React Query will help to develop a lot faster features with less codes. Here are the topics that we will cover in this course:

Module 1: Introduction


  1. Introduction to the course

  2. Pre Requirements for this course

  3. GitHub repositores

  4. Instructions to learn about how to work with GitHub

Module 2: Bootstrapping the ToDo App


  1. Installing React with create-react-app Script

  2. Create ToDo list page and create new todo form

  3. Setting Up a Simple Server using NodeJS

  4. Fetching Todos from API

  5. Implementing API call to create Todo items

Module 3: Getting Started with TanStack Query (React Query)


  1. State Management solutions and their approach

  2. Cons of Using Redux as a State Management Library

  3. Implementing the first Query in TanStack (React) Query

  4. Implementing the first Mutation in TanStack (React) Query

  5. Adding Progressbar - Implementing more Components to use TanStack Query

  6. Refactoring & Cleaning up of the Project

  7. Implementing counter to show important tasks with TanStack (React) Query

Module 4: Automated Testing

  1. What is automated testing? Benefits of testing automation

  2. Writing the first Unit Test

  3. What is Code Coverage? Getting Code Coverage Report

  4. Migrating the Project to Vite

  5. Vitest Configuration | Running Tests with Vitest

  6. Writing Tests for List Component

  7. Adding Code Coverage Report with V8

  8. Reaching to 100% Code Coverage Report for the List Component

Module 5: Error Handling & Improving UX

  1. Introduction to API Error Handling

  2. Handling API Errors

  3. Simulating a Slow API Connection

  4. Handling the Slow API Connection

  5. Handling Mutation Failures

Module 6: Digging deeper into Query Keys

  1. Learning Objectives

  2. What is a Query Key?

  3. Query Key Best Practices

  4. Query Key Common Pitfalls

module 7: implementing Edit with Mutation

  1. Introduction to the Module

  2. Implementing Modal to Show ToDo details

  3. Use TanStack Query Mutation to edit a ToDo Item (part 1)

  4. Use TanStack Query Mutation to edit a ToDo Item (part 2)

Module 8) Implementing Delete with Mutation

  1. Introduction to the Module

  2. Implementing Delete Modal Component

  3. Using DeleteModal in the ListComponent

  4. CSS Adjusment for Action Buttons

  5. Module Conclusion and Overview of the ToDo App

Module 9) Advanced Query Features

  1. Module Overview

  2. Query Caching in TanStack Query

  3. Query Caching demo in Our ToDo App

  4. Staleness Concept

  5. Staleness Concept in Action

  6. Answer to the Previous Lecture's Question

  7. Cache Time vs Stale Time

  8. Cache Time vs Stale Time in Practice



Please join me in this journey :-)


Who this course is for:

  • React Develoeprs who are trying to achieve more with coding less
  • Frontend developers who are working with APIs in a Microservice architecture
  • React developers with past expriecnes with state management libraries like Redux, React Context API, Zustand or Recoil