1. useCallback const memoizedCallback = useCallback( () => { doSomething(a, b); }, [a, b], ); Pass an inline callback and an array of dependencies. useCallback will return a memoized version of the callback that only changes if one of the ...

Markdown supported · ⌘↵ to post
No responses yet.