During reconciliation react compares trees and gets differences. Does it make sense to decrease those differences by using memoization hooks when components are not memoized?
Example:
// Does useCallback make sense here?
const onPress = useCallback(() => console.log('Press!'), []);
return (
<Pressable onPress={onPress}/> // Pressable is neither a memoized FC nor a PureComponent
)
EDIT: Would be nice to receive some numbers, e.g. performance decrease/improvement in ms, and especially for react native.
So react automatically have a memoize system that checks the diffs of all components props when rendering, regardless of your component being memorized. With this system react checks on only the primitive types (Number, String, Boolean, etc).
But if you pass a function as props and want react to memoize that function calls then the useCallback becomes useful.
react useCallback useCallback