learn deep. ship safe.Practice testsFollow ByteMunSubscribe

Concept

Context

Passing data deep into a component tree without threading props through every level.

Concept map
Learn firstReact hooks
Context

What should you learn before Context?

  1. FunctionsReusable blocks of code; in JavaScript they are values that can be passed around and returned.
  2. PropsInputs passed from a parent component to a child.
  3. Variables and scopeWhere a variable can be read: global, function and block scope, and how let, const and var differ.
  4. ClosuresA function that keeps access to the variables of the scope it was created in, after that scope has finished.
  5. StateData that changes over time and makes the UI re-render, and where to keep it.
  6. React hooksFunctions such as useState and useEffect that add state and lifecycle to function components.

Practise Context

All topics