Concept
React.memo, useMemo and useCallback skip work when inputs have not changed. They help when a render is measurably slow and its inputs are stable, and add cost and noise everywhere else.
The tutor works through these with you, in conversation and code. A session ends when you have shown them, not when a video does.
A few lines that show Memoisation doing its job.
const Row = React.memo(function Row({ item, onSelect }: RowProps) {
return <li onClick={() => onSelect(item.id)}>{item.label}</li>;
});
function List({ items }: { items: Item[] }) {
const sorted = useMemo(() => [...items].sort(byLabel), [items]);
const onSelect = useCallback((id: string) => select(id), []);
return <ul>{sorted.map((i) => <Row key={i.id} item={i} onSelect={onSelect} />)}</ul>;
}Wrapping a child in React.memo but passing it a fresh inline callback or object each render. The props are never equal, so the memo never skips, and you have paid for the comparison for nothing.
Your roadmap puts these before Memoisation, unless you already know them.
Once a session shows you understand Memoisation, it comes back for review. Each review takes a minute and tells the memory model how well you still know it.
Topics that build on Memoisation.