Ayon95 / redux-basics

This repo contains code that shows the basic usage of Redux, Redux Thunk, Redux Toolkit, and RTK Query in a React application written with TypeScript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Redux Basics

Demonstration of using Redux, Redux Thunks, Redux Toolkit, and RTK Query in a React application. This project contains two separate demonstrations for regular Redux and Redux Toolkit + RTK Query.

Get started

Open up a terminal and clone this repo:

# Clone this repository
$ git clone https://github.com/Ayon95/redux-basics.git

# Go into the repository
$ cd redux-basics

# Remove current origin repository
$ git remote remove origin

# If you want, you can add a new remote repository
$ git remote add origin https://github.com/<your-github-username>/<your-repo-name>.git

Regular Redux

Install project dependencies using npm:

# go into redux-regular folder
$ cd redux-regular

# install the necessary packages
$ npm install

# start the local development server
$ npm start

Redux Toolkit

Install project dependencies using npm:

# go into redux-toolkit folder
$ cd redux-toolkit

# install the necessary packages
$ npm install

# start the local development server
$ npm run server

Note: 'server' is an npm script that starts a local JSON server at port 8000. Check out package.json to see the script.

About

This repo contains code that shows the basic usage of Redux, Redux Thunk, Redux Toolkit, and RTK Query in a React application written with TypeScript.


Languages

Language:TypeScript 85.6%Language:CSS 8.7%Language:HTML 5.7%