🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

@lokibai/react-use-copy-clipboard

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lokibai/react-use-copy-clipboard

copy to clipboard

latest
Source
npmnpm
Version
1.0.5
Version published
Maintainers
1
Created
Source

@lokibai/react-use-copy-clipboard

copy to clipboard

NPM JavaScript Style Guide

Install

npm install --save @lokibai/react-use-copy-clipboard

Usage

import React from 'react';
import { useCopyClipboard } from '@lokibai/react-use-copy-clipboard';

const App = () => {
	const [isCopied, setCopied] = useCopyClipboard('initial text');

	const handleClick = () => {
		// setCopied('text');
		setCopied();
	};

	return (
		<button onClick={handleClick}>Was it copied? {isCopied ? 'Yes! 👍' : 'Nope! 👎'}</button>
	);
};

License

MIT ©

This hook is created using create-react-library.

FAQs

Package last updated on 03 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts