How to use useRef with Link
import {Link} from 'react-router-dom';
const myLink = useRef<Link>(null);
...
myLink.current.click()
...
<Link to={{pathname: '/terms'}} id='myLink' ref={myLink} />
the error I get is Property 'click' does not exist on type 'Link<any>'.ts(2339)
I'm currently using the below but i want to move to useRef
const myLink = document.getElementById('myLink');
if (myLink) myLink.click();