Nextjs
not only allows us to setup basic and dynamic routes, it also allows us to use a similar pattern for defining API routes. In this video we will setup two API routes, consume the data in our React
components with react-query
's useQuery
hook.
This video was published 2 years ago, now you will get an
"Error: No QueryClient set, use QueryClientProvider to set one"