@@ -24,7 +24,6 @@ import type {
2424 RelativeRoutingType ,
2525 Router as DataRouter ,
2626 RouterInit ,
27- unstable_HandleErrorFunction ,
2827} from "../router/router" ;
2928import { IDLE_FETCHER , createRouter } from "../router/router" ;
3029import type {
@@ -720,29 +719,6 @@ export interface DOMRouterOpts {
720719 * </details>
721720 */
722721 patchRoutesOnNavigation ?: PatchRoutesOnNavigationFunction ;
723- /**
724- * An error handler function that will be called for any loader/action/render
725- * errors that are encountered in your application. This is useful for
726- * logging or reporting errors instead of the `ErrorBoundary` because it's not
727- * subject to re-rendering and will only run one time per error.
728- *
729- * The `errorInfo` parameter is passed along from
730- * [`componentDidCatch`](https://react.dev/reference/react/Component#componentdidcatch)
731- * and is only present for render errors.
732- *
733- * ```tsx
734- * let router = createBrowserRouter(routes, {
735- * unstable_handleError(error, { location, errorInfo }) {
736- * console.log(
737- * `Error at location ${location.pathname}`,
738- * error,
739- * errorInfo
740- * );
741- * }
742- * );
743- * ```
744- */
745- unstable_handleError ?: unstable_HandleErrorFunction ;
746722 /**
747723 * [`Window`](https://developer.mozilla.org/en-US/docs/Web/API/Window) object
748724 * override. Defaults to the global `window` instance.
@@ -764,7 +740,6 @@ export interface DOMRouterOpts {
764740 * @param {DOMRouterOpts.dataStrategy } opts.dataStrategy n/a
765741 * @param {DOMRouterOpts.future } opts.future n/a
766742 * @param {DOMRouterOpts.unstable_getContext } opts.unstable_getContext n/a
767- * @param {DOMRouterOpts.unstable_handleError } opts.unstable_handleError n/a
768743 * @param {DOMRouterOpts.hydrationData } opts.hydrationData n/a
769744 * @param {DOMRouterOpts.patchRoutesOnNavigation } opts.patchRoutesOnNavigation n/a
770745 * @param {DOMRouterOpts.window } opts.window n/a
@@ -779,7 +754,6 @@ export function createBrowserRouter(
779754 unstable_getContext : opts ?. unstable_getContext ,
780755 future : opts ?. future ,
781756 history : createBrowserHistory ( { window : opts ?. window } ) ,
782- unstable_handleError : opts ?. unstable_handleError ,
783757 hydrationData : opts ?. hydrationData || parseHydrationData ( ) ,
784758 routes,
785759 mapRouteProperties,
@@ -802,7 +776,6 @@ export function createBrowserRouter(
802776 * @param {DOMRouterOpts.basename } opts.basename n/a
803777 * @param {DOMRouterOpts.future } opts.future n/a
804778 * @param {DOMRouterOpts.unstable_getContext } opts.unstable_getContext n/a
805- * @param {DOMRouterOpts.unstable_handleError } opts.unstable_handleError n/a
806779 * @param {DOMRouterOpts.hydrationData } opts.hydrationData n/a
807780 * @param {DOMRouterOpts.dataStrategy } opts.dataStrategy n/a
808781 * @param {DOMRouterOpts.patchRoutesOnNavigation } opts.patchRoutesOnNavigation n/a
@@ -818,7 +791,6 @@ export function createHashRouter(
818791 unstable_getContext : opts ?. unstable_getContext ,
819792 future : opts ?. future ,
820793 history : createHashHistory ( { window : opts ?. window } ) ,
821- unstable_handleError : opts ?. unstable_handleError ,
822794 hydrationData : opts ?. hydrationData || parseHydrationData ( ) ,
823795 routes,
824796 mapRouteProperties,
0 commit comments