DEV Community

loading...

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

Andrew Jones
Web, apps, and web-apps
・1 min read

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

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

Discussion (0)