-
Couldn't load subscription status.
- Fork 8
Closed
Description
Just a note to others that a Clipboard API has been part of RN core since version 0.17: https://github.com/facebook/react-native/blob/master/Libraries/Components/Clipboard/Clipboard.js (It will be included in the React Native documentation site soon.)
Usage is as follows:
import { Clipboard } from 'react-native';
Clipboard.setString('clipboard-contents');
async _getContent() {
var content = await Clipboard.getString(); // getString() returns a Promise
}It could be worth a brief note in the README that no external clipboard dependency is needed if using a newer version of RN.
Metadata
Metadata
Assignees
Labels
No labels