[English] React Native Beginner — Copy Text to Clipboard

Garry Priambudi
React Native Zone - English
1 min readAug 1, 2018
Desktop Environment by Garry Priambudi

Ingin baca tutorial ini dalam Bahasa Indonesia?

Hello, see again with React Native Zone. In this week we’ll get to know the Clipboard. Ever heard? When we are open the application payment (in example) that requires us to type booking code from application to another application. Maybe we can remember it if the booking code is short. But what if the booking code is long?

As a React Native Developer, we can use Clipboard. To take advantage of the text we want to copy and the user just paste.

This can make it easier for users to copy the booking code is quite long. How to implement it using the following way

import { Clipboard } from 'react-native';
...
...
onClick() {
Clipboard.setString("booking code");
}

That way the user just copy the code by using the paste feature on the smartphone.

So this short article, may be useful for you.
Thanks.

06.00 PM at Surabaya, Indonesia.

--

--

Garry Priambudi
React Native Zone - English

CTO as a services, Product Manager with Fullstack Background, Geeks. Father and Husband with love.