I'm trying to use useRouteError and I'm getting an error message when trying to access properties of the error object.
const error = useRouteError();
return (
<div>
{/* 'error' is of type 'unknown'.ts(18046) */}
<p>{error.statusText || error.message}</p>
</div>
);
Any ideas on how to resolve this? Or should I just ignore the TypeScript error?