Skip to content

Project to learn React Query using the Rick & Morty API

Notifications You must be signed in to change notification settings

suzaninfi/react-query-kennisdeling

Repository files navigation

React Query kennisdeling project

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

Install

npm install

Run

npm start

Pages

Without

The code in WithoutPage.tsx shows how fetching data is usually done without React Query.

With

The WithPage.tsx shows how you can use useQuery to fetch and cache data of one single endpoint.

Paginated

To see how you can handle paginated data with React Query, take a look at PaginatedPage.tsx .

Infinite

It's also possible to make an infinite scroll with React Query. The InfinitePage.tsx shows you how.

About

Project to learn React Query using the Rick & Morty API

Topics

Resources

Stars

Watchers

Forks