import ‘useCallback’ from ‘react’

useCallback() is similar to useMemo, but the difference between the two is that useMemo() takes a function and returns the return value of that function, whereas useCallback() takes a function and returns that exact function so that we can call it as a function in our application.

By using useCallback()…

--

--