Closed tongtongde closed 2 years ago
When you click Copy, you get the value asynchronously, and then you can't get the latest value `const onClick= () => { setCopyText('text'); }; <CopyToClipboard text={copyText}
` consider exposing the copy method?
Why would you need react-copy-to-clipboard then? Just use copy-to-clipboard lib directly
When you click Copy, you get the value asynchronously, and then you can't get the latest value `const onClick= () => { setCopyText('text'); }; <CopyToClipboard text={copyText}