DEV Community

J E E N A R J U N
J E E N A R J U N

Posted on

Convert text of a button from 'Copy' to 'Copied' and then back to 'Copy' after few seconds

How to convert jQuery code to React JS?

I have a button with text 'Copy'. When I click on it should change its text to 'Copied' and copy to Clipboard. Once copied, after few seconds I want the text to go back to 'Copy'. The following function will work I…

Top comments (0)