diff --git a/packages/react-router/src/Match.tsx b/packages/react-router/src/Match.tsx index 24cfe06810..58f00e8e77 100644 --- a/packages/react-router/src/Match.tsx +++ b/packages/react-router/src/Match.tsx @@ -291,14 +291,16 @@ export const Outlet = React.memo(function OutletImpl() { const nextMatch = - const pendingElement = router.options.defaultPendingComponent ? ( - - ) : null - if (matchId === rootRouteId) { - return ( - {nextMatch} - ) + const PendingComponent = + route.options.pendingComponent ?? router.options.defaultPendingComponent + if (PendingComponent !== undefined) { + return ( + }> + {nextMatch} + + ) + } } return nextMatch