DEV Community

loading...

Simple explanation of the difference between React.useCallback and React.useMemo

aej11a profile image aej11a ・1 min read

React.useMemo(func) saves the RESULT of executing func().

React.useCallback(func) saves func ITSELF without executing func.

Discussion (0)

pic
Editor guide