Navigate back to the homepage

How to disable touchableopacity in react native

Infinitbility
React Native
August 4th, 2021 · 1 min read
How to disable touchableopacity in react native

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

1<TouchableOpacity disabled={true}>
2 <Text>I'm disabled</Text>
3</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

1<Pressable disabled={true}>
2 {({ pressed }) => (
3 <Text>I'm disabled</Text>
4 )}
5</Pressable>

Thanks For Reading…

Join our email list and get notified about new content

No worries, I respect your privacy and I will never abuse your email.

Every week, on Tuesday, you will receive a list of free tutorials I made during the week (I write one every day) and news on other training products I create.

Looking For React Native Tutorial?

we are trying to create the best Tutorial for react native developers.

When you want a daily updates about React Native Tutorial or infinitbility update subscribe to our newsletter.

Read React Native Tutorial

Request New Tutorial or Article on mail [email protected]

Tutorials

React Native

Categories

More articles from Infinitbility

How to clean cache in react native

How to clean cache in react native

React Native clean cache example

August 3rd, 2021 · 1 min read
How to comment in react native

How to comment in react native

React Native comments example

August 3rd, 2021 · 1 min read
© 2020–2021 Infinitbility
About
Link to $https://medium.com/infinitbilityLink to $https://www.facebook.com/InfinitbilityLink to $https://github.com/infinitbilityLink to $https://twitter.com/infinitbilityLink to $https://www.buymeacoffee.com/infinitbilityLink to $mailto:[email protected]