Skip to content

This app showcases eight ways to handle React state.

Notifications You must be signed in to change notification settings

redstrike/react-state-demo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This app showcases eight ways to handle React state.

8 ways to handle React state

Each branch implements the same features using different approaches.

Branch State examples
main useState, useRef, web storage, lifted state, derived state
ref useRef for uncontrolled components
context context
immer immer
useReducer useReducer
class Class-based state example
react-query React query for remote state

Quick Start

Make sure you have these installed:

  • Node 10 or newer (To check your version: npm -v)
  • Git

Then, run these commands on the command line:

npm install
npm start

npm start starts the app and the mock API.

This project was bootstrapped with Create React App.

About

This app showcases eight ways to handle React state.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 84.7%
  • CSS 9.8%
  • HTML 5.5%