Skip to content

Sample application to demonstrate the difference between SWR and React Query

License

Notifications You must be signed in to change notification settings

Codebrahma/swr-vs-react-query

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

Twitter: Codebrahma

This is a sample application to demonstrate the difference between SWR and React Query. This monorepo consists of the following packages:

  1. components: Components library
  2. react-query-nextjs: Next.js application bundled with React Query
  3. strapi: Dockerized Strapi application
  4. swr-nextjs: Next.js application bundled with SWR

Overview

This boilerplate is built using the following technologies:

  1. SWR
  2. React Query
  3. GraphQL
  4. Next.js

Requirements

  1. Node.js
  2. npm
  3. Docker

Installation

1. Clone the application

git clone https://github.com/ghoshnirmalya/swr-vs-react-query

2. Install necessary dependencies

npx lerna bootstrap

3. Start the applications

From the root directory, we can run the following command to start our applications:

yarn dev

The above command will start the swr-nextjs application on http://localhost:3001/ and the react-query-nextjs application on http://localhost:3002/.

4. Go inside the directory of the Strapi package on another terminal window

cd packages/strapi

5. Start docker-compose

docker-compose up

We need to start Docker and then run the above command which will change the current directory to the backend package’s directory and then start the backend package. If everything goes well, it’ll be up and running on http://localhost:1337.

Other interesting repositories

  1. Hasura Next.js Boilerplate
  2. Strapi Next.js Boilerplate
  3. React Search Box
  4. LinkedIn Clone using Create React App
  5. Building mono-repo applications using Lerna

License

This project is licensed under the MIT License.

About

Sample application to demonstrate the difference between SWR and React Query

Resources

License

Stars

Watchers

Forks