When you click a link, the browser tries to redirect the user ASAP. How can I add a 1 second delay to this process?
I have the following link:
<Link
to={{
pathname: `pathname`,
hash: `#hash`,
}}
onClick={this.delayRedirect}
>
Here is what my delayRedirect function looks like:
delayRedirect() {
// not sure what to put here, to delay the redirect by 1 second
}
Any ideas? Thanks!