Frontend with React
⚡ Custom hooks and performance
Extract reusable logic into custom hooks and learn to reason about performance: React.memo, useMemo, useCallback and, above all, when to optimize (and when not to).
What you'll learn
- Create custom
useXxxhooks that encapsulate and reuse stateful logic - Apply the rules of hooks: call them at the top level and only from components or hooks
- Memoize components, values and functions with
React.memo,useMemoanduseCallback - Decide when to optimize by measuring first with the Profiler instead of blindly
Lessons
Custom hooks: reusable stateful logicExtract logic into useXxx functions. Performance: why React re-rendersReact.memo, useMemo and useCallback. When (and when not) to optimizeMeasure first; don't optimize blindly.Practice this module in the app
DevPath is a hands-on course: you read the theory here; in the app you put it into practice with exercises that really run, offline.
Start free in the app →