Course lesson
Set up RTK Query with createAPI and ApiProvider that Serve Fake Data
The first thing we need to do to set up Redux Toolkit Query is to create API end points and wrap our application in an ApiProvider that RTK Query gives us. For this application, we will expose two endpoints. One endpoint will be the list of all pokemon and...
- Duration
- 4 min
- Access
- Free
- Transcript
- Retained from source evidence
The first thing we need to do to set up Redux Toolkit Query is to create API end points and wrap our application in an ApiProvider that RTK Query gives us. For this application, we will expose two endpoints. One endpoint will be the list of all pokemon and the other will be the pokemon detail page.
Then we'll use the endpoints we built and load the data from RTK Query hooks along with loading and error states.