O'Reilly logo

React Native Cookbook by Crysfel Villa, Stan Bershadskiy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Copy and pasting content

One of the most used features in both desktop and mobile operating systems is the clipboard to copy and paste content. A scenario may be the user filling out a form in your awesome React Native app, where there is a field for a contact's e-mail address, a particularly lengthy and cumbersome one. Instead of typing it with a few typos, it would be easier to just open your contacts application and copy the e-mail from there and paste it into your TextInput field.

This recipe will show a basic example on both Android and iOS of how we can copy and paste text inside our React Native application. In our sample app, we will have both a static Text view and a TextInput field that you can copy its contents to the clipboard. Also, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required