learn deep. ship safe.Practice testsFollow ByteMunSubscribe

Technique

Memoization

Caching a computed result or component so it is not recomputed when inputs have not changed.

Concept map
Memoization

What should you learn before Memoization?

  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.
  7. RenderingWhen and why components render, and what triggers a re-render.

Practise Memoization

All topics