MCPcopy Create free account
hub / github.com/coryhouse/react-state-demo

github.com/coryhouse/react-state-demo @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
36 symbols 77 edges 25 files 1 documented · 3% updated 3y ago★ 741 open issues

Browse by type

Functions 33 Types & classes 3
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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.

Extension points exported contracts — how you extend this code

browse all types & interfaces →

Core symbols most depended-on inside this repo

browse all functions →

Shape

Function 30
Method 3
Class 2
Interface 1

Languages

TypeScript100%

Modules by API surface

src/Checkout.jsx5 symbols
src/ErrorBoundary.jsx4 symbols
src/App.jsx4 symbols
cypress/integration/detail.spec.js3 symbols
src/useLocalStorage.js2 symbols
src/services/useFetchAll.js2 symbols
src/services/shippingService.js2 symbols
src/services/productService.js2 symbols
src/Products.jsx2 symbols
src/Cart.jsx2 symbols
cypress/support/index.d.ts2 symbols
src/services/useFetch.js1 symbols

For agents

$ claude mcp add react-state-demo \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page