Reactjs CLIC COPY

onClick={() => {navigator.clipboard.writeText(this.state.textToCopy)}}
Grumpy Gharial