Practice project to learn React Query. Shows three way to use the useQuery
hook to fetch and cache data, by fetching
episodes from the Rick and Morty API and displaying them.
You can find the app live on https://suzaninfi.github.io/react-query-kennisdeling
npm install
npm start
The code in WithoutPage.tsx
shows how fetching data is usually done without React
Query.
The WithPage.tsx
shows how you can use useQuery
to fetch and cache data of one single
endpoint.
To see how you can handle paginated data with React Query, take a look
at PaginatedPage.tsx
.
It's also possible to make an infinite scroll with React Query. The InfinitePage.tsx
shows you how.