@tanstack/react-router 0.0.1-beta.217 → 0.0.1-beta.219
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.
- package/build/cjs/Matches.js +5 -3
- package/build/cjs/Matches.js.map +1 -1
- package/build/cjs/RouterProvider.js +0 -1
- package/build/cjs/RouterProvider.js.map +1 -1
- package/build/esm/index.js +5 -4
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +263 -263
- package/build/umd/index.development.js +5 -4
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +2 -2
- package/src/Matches.tsx +29 -21
- package/src/RouterProvider.tsx +0 -5
|
@@ -1715,7 +1715,6 @@
|
|
|
1715
1715
|
if (typeof shouldReloadDeps === 'object') {
|
|
1716
1716
|
// compare the deps to see if they've changed
|
|
1717
1717
|
shouldReload = !deepEqual(shouldReloadDeps, match.shouldReloadDeps);
|
|
1718
|
-
console.log(shouldReloadDeps, match.shouldReloadDeps, shouldReload);
|
|
1719
1718
|
match.shouldReloadDeps = shouldReloadDeps;
|
|
1720
1719
|
} else {
|
|
1721
1720
|
shouldReload = !!shouldReloadDeps;
|
|
@@ -2141,7 +2140,7 @@
|
|
|
2141
2140
|
const PendingComponent = route.options.pendingComponent ?? options.defaultPendingComponent ?? defaultPending;
|
|
2142
2141
|
const routeErrorComponent = route.options.errorComponent ?? options.defaultErrorComponent ?? ErrorComponent;
|
|
2143
2142
|
const ResolvedSuspenseBoundary = route.options.wrapInSuspense ? React__namespace.Suspense : SafeFragment;
|
|
2144
|
-
const errorComponent = React__namespace.useCallback(props => {
|
|
2143
|
+
const errorComponent = routeErrorComponent ? React__namespace.useCallback(props => {
|
|
2145
2144
|
return /*#__PURE__*/React__namespace.createElement(routeErrorComponent, {
|
|
2146
2145
|
...props,
|
|
2147
2146
|
useMatch: route.useMatch,
|
|
@@ -2149,7 +2148,7 @@
|
|
|
2149
2148
|
useSearch: route.useSearch,
|
|
2150
2149
|
useParams: route.useParams
|
|
2151
2150
|
});
|
|
2152
|
-
}, [route]);
|
|
2151
|
+
}, [route]) : undefined;
|
|
2153
2152
|
return /*#__PURE__*/React__namespace.createElement(matchesContext.Provider, {
|
|
2154
2153
|
value: matches
|
|
2155
2154
|
}, /*#__PURE__*/React__namespace.createElement(ResolvedSuspenseBoundary, {
|
|
@@ -2159,7 +2158,7 @@
|
|
|
2159
2158
|
useSearch: route.useSearch,
|
|
2160
2159
|
useParams: route.useParams
|
|
2161
2160
|
})
|
|
2162
|
-
}, /*#__PURE__*/React__namespace.createElement(CatchBoundary, {
|
|
2161
|
+
}, errorComponent ? /*#__PURE__*/React__namespace.createElement(CatchBoundary, {
|
|
2163
2162
|
resetKey: locationKey,
|
|
2164
2163
|
errorComponent: errorComponent,
|
|
2165
2164
|
onCatch: () => {
|
|
@@ -2167,6 +2166,8 @@
|
|
|
2167
2166
|
}
|
|
2168
2167
|
}, /*#__PURE__*/React__namespace.createElement(MatchInner, {
|
|
2169
2168
|
match: match
|
|
2169
|
+
})) : /*#__PURE__*/React__namespace.createElement(SafeFragment, null, /*#__PURE__*/React__namespace.createElement(MatchInner, {
|
|
2170
|
+
match: match
|
|
2170
2171
|
}))));
|
|
2171
2172
|
}
|
|
2172
2173
|
function MatchInner({
|