Course lesson
Migrating a fetch() Call from Redux to RTK Query with builder.query()
In this lesson we use the builder.query() to define an extremely simple endpoint.
- Duration
- 3 min
- Access
- Free
- Transcript
- Retained from source evidence
In this lesson we use the builder.query() to define an extremely simple endpoint.
It's worth noting that query() takes an object with a property confusingly called query which can return a URL, which is all we do here. It can also return an object, which we'll see in later lessons.
For more information about queries, see: https://redux-toolkit.js.org/rtk-query/usage/queries