Skip to content
skillbld
Day 9 of 14 30 minuseRefuseMemomemo

Use useRef to reach DOM elements and to keep values that don't trigger re-renders. Then learn when React re-renders, and how memo, useMemo and useCallback skip unnecessary work, plus when not to bother.

By the end of today you can

  • Focus inputs and measure elements with a DOM ref
  • Keep mutable values like timer ids in a ref
  • Explain when and why components re-render
  • Skip work with useMemo, memo and useCallback
  • Decide when optimisation is worth it

What's inside

  • 5 sections
  • 3 diagrams and mind maps
  • 3 code examples you can run
  • 5-question quiz
  1. 1Refs to DOM elements
  2. 2Refs for values that don't affect the screen
  3. 3When does React re-render?
  4. 4Skipping work: useMemo, memo and useCallback
  5. 5When to optimise

Sign in free to read this lesson

Get the full lesson with diagrams, runnable code and the quiz. Your progress is saved across devices.

Sign in free
Day 9: Refs & Performance · React · SkillBld