All Projects → matthamil → react-context

matthamil / react-context

Licence: other
(つ°ヮ°)つ Understanding React Context

Projects that are alternatives of or similar to react-context

react-wisteria
Managing the State with the Golden Path
Stars: ✭ 18 (+63.64%)
Mutual labels:  state-management, context
use-app-state
🌏 useAppState() hook. that global version of setState() built on Context.
Stars: ✭ 65 (+490.91%)
Mutual labels:  state-management, context
reactube-client
A clone Youtube Web Player using React Provider Pattern, React Context and Typescript
Stars: ✭ 92 (+736.36%)
Mutual labels:  state-management, context
Use Global Context
A new way to use “useContext” better
Stars: ✭ 34 (+209.09%)
Mutual labels:  state-management, context
Alveron
Elm & Reason inspired state management for React
Stars: ✭ 57 (+418.18%)
Mutual labels:  state-management, context
React Workshop
⚒ 🚧 This is a workshop for learning how to build React Applications
Stars: ✭ 114 (+936.36%)
Mutual labels:  state-management, context
Yewdux
Redux-like state containers for Yew apps
Stars: ✭ 58 (+427.27%)
Mutual labels:  state-management, context
Contextism
😍 Use React Context better.
Stars: ✭ 141 (+1181.82%)
Mutual labels:  state-management, context
React Organism
Dead simple React state management to bring pure components alive
Stars: ✭ 219 (+1890.91%)
Mutual labels:  state-management
Pulse
✨ Pulse is a global state and logic framework for reactive Typescript & Javascript applications. Supporting frameworks like VueJS, React and React Native.
Stars: ✭ 243 (+2109.09%)
Mutual labels:  state-management
Devonfw4flutter
A guide aiming to bridge the gap between the absolute Flutter basics and clean, structured Flutter Development
Stars: ✭ 219 (+1890.91%)
Mutual labels:  state-management
Use Machine
React Hook for using Statecharts powered by XState. use-machine.
Stars: ✭ 226 (+1954.55%)
Mutual labels:  state-management
Final Form
🏁 Framework agnostic, high performance, subscription-based form state management
Stars: ✭ 2,787 (+25236.36%)
Mutual labels:  state-management
Tailor made
✄ Managing a Fashion designer's daily routine.
Stars: ✭ 219 (+1890.91%)
Mutual labels:  state-management
generic bloc provider
Generic BloC provider implementation
Stars: ✭ 26 (+136.36%)
Mutual labels:  state-management
Hydux
A light-weight type-safe Elm-like alternative for Redux ecosystem, inspired by hyperapp and Elmish
Stars: ✭ 216 (+1863.64%)
Mutual labels:  state-management
Controllerim
A state management library for React
Stars: ✭ 213 (+1836.36%)
Mutual labels:  state-management
react-globally
Gives you setGlobalState, so you can set state globally
Stars: ✭ 22 (+100%)
Mutual labels:  state-management
ghaction-dump-context
GitHub Action composite to dump context
Stars: ✭ 30 (+172.73%)
Mutual labels:  context
Model
Angular Model - Simple state management with minimalist API, one way data flow, multiple model support and immutable data exposed as RxJS Observable.
Stars: ✭ 242 (+2100%)
Mutual labels:  state-management

(つ ° ヮ °)つ Understanding React Context

A repo containing different ways to manage state in React with simple examples.

How to use this repo

You've heard about the Context API. You're ready to start using it. Here's a friendly step-by-step progression to using context to manage some portion of your state in your production app.

Each flavor of state management is under a separate branch:

  1. Component State (setState)
  2. Redux
  3. Context
  4. Nested Context
  5. Unstated (this is awesome )

Checkout each branch one-by-one and run yarn run start (or npm run start) to see the app in action.

⚠️ This repo is not an endorsement of using context for all of your state management problems. Obligatory Tweet from Dan Abramov:

dan abramov

Helpful Resources

  1. awesome-react-context
  2. Unstated
  3. Context API RFC
  4. Context API pull request

Practice using Context

But Matt, I want to understand Context better! What can I do?

Well, you can read about some of the resources above ☝️. You can also try to extend the app in this repo by doing the following exercises:

  1. Extend the Context example to use a product category context to choose which type of products are rendered in the product list.
  2. Extend the Unstated example to use the a currency context like the one in the Nested Context example.
  3. Create a PR and fix my bad code.
  4. Follow me on Twitter.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].