RTK Query is a powerful new way to model data fetching and caching in Redux applications. It’s built on top of Redux Toolkit, but hides almost any interaction with reducers, selectors or thunks behind custom hooks generated specifically for your API.
If your redux application relies heavily on data coming in from over the network, there’s a good chance RTK Query is worth adopting. It will allow you to remove significant chunks of code while also giving you new tools for error handling and cache invalidation that will make your users smile. Apply what I teach in this course and you won’t have to think about thunks ever again.
Sample code can be found here.
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.
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.