import { Link } from '@reach/router' ; import * as React from 'react' ; import { usePrefetch } from 'react-static' ; interface RouterLinkProps { readonly to : string ; } export const RouterLink = ( { to , ... props } ) => { const ref = usePrefetch ( to ) ; return < Link ref = { ref as any } to = { to } { ... props } />; } ;