React Native Enable Touch and Hold to Select Copy Text

Hello friends, Our today’s tutorial is so simple but most usable for react native developers. As a part of react native copy and paste text is so much used by users. If your application is text based like Article based, Jokes based then copying that text is so much helpful for app users. Because this is how they can easily copy the article and save it anywhere in their phone. In react native we can make the Text component text Copyable using selectable={true} prop. This prop allows the Text to selectable by user. So in this tutorial we would learn about React Native Enable Touch and Hold to Select Copy Text.

Contents in this project React Native Enable Touch and Hold to Select Copy Text :-

1. Open your project’s main App.js file and import StyleSheet, Text and SafeAreaView component.

2. Creating our main App functional component.

3. Creating a Text component with selectable={true} prop to enable touch and hold to copy and select.

4. Creating Style.

5. Complete Source Code for App.js file :-

Screenshot :-

React Native Enable Touch and Hold to Select Copy Text