useCallback
useCallback keeps a function identity stable between renders.
Example
const onPick = useCallback((id) => {
setSelected(id);
}, []);
<Row onPick={onPick} />;Exercise
Cache a function.
(() => {}, [])Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.