illustration for RTK Query Basics: Query Endpoints, Data Flow and TypeScript

RTK Query Basics: Query Endpoints, Data Flow and TypeScript

20m closed-captioning
Star icon$$$
Star icon$$$
Star icon$$$
Star icon$$$
Star icon$$$
4.4
242
people completed
Bookmark
Download
RSS

Almost every React application needs to fetch data from a server and cache the result between renders.

Traditionally, in-memory API Caching is something that has been done in React applications either on a per-component-level, which lead to application state running out of sync, or using a global state like Redux, which required a lot of hand-written code.

RTK Query is part of the official Redux Toolkit and provides an application-global API cache that abstracts most of that hand-written code away, leading to a lot more readable code bases.

It also offers a lot of advanced features like auto-generated hooks

In this course, you will learn about

  • Using createApi to define multiple endpoints to interact with your API
  • The auto generated useQuery hooks and how to use them in your application
  • The RTK Query Dataflow and the role of the baseQuery function
  • The Redux Devtools “RTK Query” Monitor and which actions are flowing though your app
  • How to use RTK Query either with an ApiProvider or a pre-existing Redux store
  • Using RTK Query with TypeScript

Free Community Resource

A Community Resource means that it’s free to access for all. The instructor of this lesson requested it to be open to the public.

Learner Reviews

  • Juan G. Jordán
    a month ago
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    What did you like about this course?

    Hands on example with the basics to understand RTK Query.

    The concepts are introduced gradually, going from a hardcoded API to a full fledged cache enabled API.

  • Badreddine Bendriss
    3 months ago
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    What did you like about this course?

    Simple and clear explanation of RTK query

  • Learner
    10 months ago
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    What did you like about this course?

    great instructor. clear and concise

  • iversonLv
    a year ago
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    What did you like about this course?

    Cool tut~ I really love refactoring step by step

  • Dmitry Birin
    a year ago
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    What did you like about this course?

    Short and nice introduction! Thanks!

  • Learner
    a year ago
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    What did you like about this course?

    Very short. Was hoping there would be more things covered that are in documentation along with edge cases and examples of old redux way of doing things vs RTKQuery way of doing things

Course Content

20m • 9 lessons

    You might also like these resources:

    illustration for Introduction to Cloudflare Workers

    Introduction to Cloudflare Workers

    Kristian Freeman・36m・Course

    Become familiar with the Workers CLI wrangler that we will use to bootstrap our Worker project. From there you'll understand how a Worker receives and returns requests/Responses. We will also build this serverless function locally for development and deploy it to a custom domain.

    illustration for Create an eCommerce Store with Next.js and Stripe Checkout

    Create an eCommerce Store with Next.js and Stripe Checkout

    Colby Fayock・1h 4m・Course

    This is a practical project based look at building a working e-commerce store using modern tools and APIs. Excellent for a weekend side-project for your developer project portfolio

    illustration for Practical Git for Everyday Professional Use

    Practical Git for Everyday Professional Use

    Trevor Miller・1h・Course

    git is a critical component in the modern web developers tool box. This course is a solid introduction and goes beyond the basics with some more advanced git commands you are sure to find useful.