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.
I don't think so. This is the example in the React.org site.
Here [a, b] is a dependency list. This means callback is called automatically when a or b has changed. It seems to be not called like yours. You passed no dependencies and callback will not be called. I think you can change in this way if you wanna use callback.