@tanstack/react-router 0.0.1-beta.243 → 0.0.1-beta.245

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33,7 +33,7 @@ export declare function Matches(): React.JSX.Element;
33
33
  export declare function Match({ matchId }: {
34
34
  matchId: string;
35
35
  }): React.JSX.Element;
36
- export declare function Outlet(): React.JSX.Element | null;
36
+ export declare const Outlet: React.NamedExoticComponent<object>;
37
37
  export interface MatchRouteOptions {
38
38
  pending?: boolean;
39
39
  caseSensitive?: boolean;
@@ -1315,7 +1315,7 @@
1315
1315
  }
1316
1316
  invariant(false, 'Idle routeMatch status encountered during rendering! You should never see this. File an issue!');
1317
1317
  }
1318
- function Outlet() {
1318
+ const Outlet = /*#__PURE__*/React__namespace.memo(function Outlet() {
1319
1319
  const matchId = React__namespace.useContext(matchContext);
1320
1320
  const childMatchId = useRouterState({
1321
1321
  select: s => {
@@ -1330,7 +1330,7 @@
1330
1330
  return /*#__PURE__*/React__namespace.createElement(Match, {
1331
1331
  matchId: childMatchId
1332
1332
  });
1333
- }
1333
+ });
1334
1334
  function useMatchRoute() {
1335
1335
  const {
1336
1336
  matchRoute
@@ -1610,8 +1610,9 @@
1610
1610
  const {
1611
1611
  buildLink
1612
1612
  } = useRouter();
1613
- const match = useMatch({
1614
- strict: false
1613
+ const matchPathname = useMatch({
1614
+ strict: false,
1615
+ select: s => s.pathname
1615
1616
  });
1616
1617
  const {
1617
1618
  // custom props
@@ -1646,7 +1647,7 @@
1646
1647
  ...rest
1647
1648
  } = options;
1648
1649
  const linkInfo = buildLink({
1649
- from: options.to ? match.pathname : undefined,
1650
+ from: options.to ? matchPathname : undefined,
1650
1651
  ...options
1651
1652
  });
1652
1653
  if (linkInfo.type === 'external') {