useMemo and useCallback
Syntax
const memoValue = useMemo(callback, optionalArgumentList);Where :
memoValue: Return memorized by useMemo.callback: Function that is executed one or more times according tooptionalArgumentList.optionalArgumentList: Array of arguments that controls the execution ofcallback, if an argument ofoptionalArgumentListchanges it will trigger thatcallbackis executed again.
useCallback
Hook that allows you to memorize a callback so that it keeps its scope
const memoCallback = useCallack(callback, optionalArgumentList);Where:
memoCallback: Return memorized by useCallback.
Last updated
Was this helpful?
