useclipboard
v1.0.3
Published
React hook for subscribing to clipboard
Downloads
1
Maintainers
Readme
useClipboard
subscribes to clipboard
Note: This is using the new React Hooks API Proposal
Install
npm install useclipboard --save
- Yarn
yarn add useclipboard
Usage
import useClipboard from 'useclipboard';
function yourComponent() {
let cliboard = useClipboard();
// {
// clipboardtext:text,
// setText: function to update clipboardText,
// syncClipboardText: function to sync cliboardText
// }
// ...
}