@tanstack/react-router 0.0.1-beta.1 → 0.0.1-beta.3
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/react-router/src/index.js +1 -1
- package/build/cjs/react-router/src/index.js.map +1 -1
- package/build/cjs/router-core/build/esm/index.js +3 -3
- package/build/cjs/router-core/build/esm/index.js.map +1 -1
- package/build/esm/index.js +4 -4
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +29 -29
- package/build/umd/index.development.js +4 -4
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +2 -2
- package/build/umd/index.production.js.map +1 -1
- package/package.json +3 -3
- package/src/index.tsx +1 -0
- package/src/qss.ts +0 -53
package/build/esm/index.js
CHANGED
|
@@ -1729,9 +1729,9 @@ function stringifySearchWith(stringify) {
|
|
|
1729
1729
|
|
|
1730
1730
|
var _window$document;
|
|
1731
1731
|
// Detect if we're in the DOM
|
|
1732
|
-
const isServer =
|
|
1732
|
+
const isServer = typeof window === 'undefined' || !((_window$document = window.document) != null && _window$document.createElement); // This is the default history object if none is defined
|
|
1733
1733
|
|
|
1734
|
-
const createDefaultHistory = () =>
|
|
1734
|
+
const createDefaultHistory = () => isServer ? createMemoryHistory() : createBrowserHistory();
|
|
1735
1735
|
|
|
1736
1736
|
function createRouter(userOptions) {
|
|
1737
1737
|
var _userOptions$stringif, _userOptions$parseSea;
|
|
@@ -1790,7 +1790,7 @@ function createRouter(userOptions) {
|
|
|
1790
1790
|
isPreloading: Object.values(router.matchCache).some(d => d.match.isFetching && !router.state.matches.find(dd => dd.matchId === d.match.matchId))
|
|
1791
1791
|
});
|
|
1792
1792
|
cascadeLoaderData(router.state.matches);
|
|
1793
|
-
router.listeners.forEach(listener => listener());
|
|
1793
|
+
router.listeners.forEach(listener => listener(router));
|
|
1794
1794
|
},
|
|
1795
1795
|
mount: () => {
|
|
1796
1796
|
const next = router.__.buildLocation({
|
|
@@ -2505,7 +2505,7 @@ function MatchesProvider(props) {
|
|
|
2505
2505
|
}
|
|
2506
2506
|
|
|
2507
2507
|
const useRouterSubscription = router => {
|
|
2508
|
-
useSyncExternalStore(cb => router.subscribe(() => cb()), () => router.state);
|
|
2508
|
+
useSyncExternalStore(cb => router.subscribe(() => cb()), () => router.state, () => router.state);
|
|
2509
2509
|
};
|
|
2510
2510
|
|
|
2511
2511
|
function createReactRouter(opts) {
|