Skip to content

ripixel/state-management-examples

Repository files navigation

state-management-examples

Examples of various state management techniques in React

What examples are there?

It covers the possible usage of the following methods for managing state in a React application:

  • Ref
  • Context
  • State
  • Flux (a la React release version)
  • Redux
  • Recoil
  • MobX

It attempts to address the pros/cons of each, and what they should and should not be used for.

How to use the sample code

The sample application uses a very basic React Router to decide which implementation you want to see.

In src/pages you can see the various examples, as well as in the index.

In src/components you will find the various components that are referenced in each of the pages.

Tests?

Nope! These are examples, not production code!

Is it live?

Yes: https://state-management-examples.web.app/

Running locally

Run npm ci to install dependencies, then npm run dev to boot up a local server.

About

Examples of various state management techniques in React

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •