Copy to clipboard React component using clipboard.js
npm install --save react-clipboard-component
import React from, {Component} 'react'
import Clipboard from 'react-clipboard-component'
export default class App extends Component {
render () {
return (
<Clipboard clipboard-text="Lorem ipsum dolor sit amet.">
<button>copy</button>
</Clipboard>
)
}
}
Text to be copied to clipboard
MIT