const memoizedFn = useCallback(() => { doSomething(a, b); }, [a, b]);