React JS Quiz
HomeBlogPrivacy PolicyContact UsTutorialsNewBuy me a coffee

Context and Shared State

  1. 1.The Prop Drilling Problem
  2. 2.Creating and Using Context
  3. 3.Context and Re-renders
  4. 4.Context with a Reducer
  5. 🏁 End-of-tutorial quiz
Advertisement
Tutorials/Intermediate/Context and Shared State

Context and Shared State

Stop threading props through layers that do not need them. Create a context, provide a value, consume it with useContext, and avoid the performance traps.

Level
Intermediate
Chapters
4
Exercises
1
Reading time
15 min
Start the tutorial →

What you will cover

  1. 1. The Prop Drilling ProblemWhat context is for, and the cheaper fixes worth trying first.
  2. 2. Creating and Using ContextThe three pieces: create, provide, consume.
  3. 3. Context and Re-rendersThe one performance trap everyone hits, and how to avoid it.
  4. 4. Context with a ReducerThe standard pattern for app-wide state without a library.
Already know this? Jump to the 7 question quiz →

Up next after this one: useReducer and Complex State

Advertisement
Advertisement
Support the developer