This has quite a few errors when using in type script
import { useLocation, NavLink } from "react-router-dom";
function QueryNavLink({ to, ...props }) {
let location = useLocation();
return <NavLink to={to + location.search} {...props} />;
}
TS7031: Binding element 'to' implicitly has an 'any' type.
TS2741: Property 'children' is missing in type '{ to: string; }' but required in type 'NavLinkProps'.
I am not quite sure how to resolve this? thanks, Dean