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