Framework-mode router component to be used to hydrate a router from a
ServerRouter. See entry.client.tsx.
function HydratedRouter(props: HydratedRouterProps)
Context factory function to be passed through to createBrowserRouter.
This function will be called to create a fresh context instance on each
navigation/fetch and made available to
clientAction/clientLoader
functions.
An error handler function that will be called for any middleware, loader, action,
or render errors that are encountered in your application. This is useful for
logging or reporting errors instead of in the ErrorBoundary because it's not
subject to re-rendering and will only run one time per error.
The errorInfo parameter is passed along from
componentDidCatch
and is only present for render errors.
<HydratedRouter onError=(error, info) => {
let { location, params, unstable_pattern, errorInfo } = info;
console.error(error, location, errorInfo);
reportToErrorService(error, location, errorInfo);
}} />