Hello Friends đź‘‹,

Welcome To Infinitbility! ❤️

This tutorial will help you to disable react-native touchable opacity, hear you will get answer of how to disable touchableopacity in react native with example.

Let start today topic How to disable touchableopacity in react native

React Native touchableopacity provide a disabled attribute to disable touchableopacity, you have to just pass true in the disabled attribute like the below example.

Touchableopacity disabled example

<TouchableOpacity disabled={true}>
  <Text>I'm disabled</Text>
</TouchableOpacity>

Well if you are using Pressable components then also you can use disabled={true} it also works the same as TouchableOpacity.

Pressable disabled example

<Pressable disabled={true}>
  {({ pressed }) => (
    <Text>I'm disabled</Text>
  )}
</Pressable>

Thanks For Reading…