Setting this to true
means that the {propName}
prop of the component should be treated as a stable, dependency-free value - i.e. it only references values that will not change between renders (such as refs and setState functions), or in another way to say, shall be safe to pass into the useCallback
hook without any specifying any dependencies.
<Button onPressIsStable onPress={() => Alert.alert('Pressed')} /
This is a performance optimization to prevent unnecessary re-renders of the component, and should only be used when the propName
function is guaranteed to be stable.