react-router 0.0.0-experimental-073f56f6c → 0.0.0-experimental-abc385596
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/CHANGELOG.md +50 -0
- package/dist/development/{chunk-DTAL2P4H.js → chunk-455JCIZ4.js} +7 -7
- package/dist/development/{chunk-G7GAQ6DB.js → chunk-JG23XKJ4.js} +106 -103
- package/dist/development/{chunk-JMYIHYFE.mjs → chunk-NQJPHWDN.mjs} +10 -7
- package/dist/development/{chunk-JF3QLIJ3.mjs → chunk-PSUL3UUV.mjs} +22 -21
- package/dist/development/{chunk-W74L3N3X.js → chunk-WXPXGSJW.js} +2 -2
- package/dist/development/dom-export.js +28 -28
- package/dist/development/dom-export.mjs +3 -3
- package/dist/development/{index-react-server-client-CK5fBojp.d.ts → index-react-server-client-BS5F89FR.d.ts} +9 -1
- package/dist/development/{index-react-server-client-DwQvbs9m.d.mts → index-react-server-client-DY04-103.d.mts} +9 -1
- package/dist/development/index-react-server-client.d.mts +1 -1
- package/dist/development/index-react-server-client.d.ts +1 -1
- package/dist/development/index-react-server-client.js +4 -4
- package/dist/development/index-react-server-client.mjs +2 -2
- package/dist/development/index-react-server.js +4 -4
- package/dist/development/index-react-server.mjs +4 -4
- package/dist/development/index.d.mts +31 -6
- package/dist/development/index.d.ts +31 -6
- package/dist/development/index.js +101 -100
- package/dist/development/index.mjs +3 -3
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/production/{chunk-2CG4IJO4.js → chunk-DENJ7T3K.js} +2 -2
- package/dist/production/{chunk-Z2XLV6IQ.js → chunk-FWTPT7JC.js} +106 -103
- package/dist/production/{chunk-E5QNHLMM.mjs → chunk-GNIM2PY3.mjs} +22 -21
- package/dist/production/{chunk-BRF4GHOX.mjs → chunk-LL25D23O.mjs} +10 -7
- package/dist/production/{chunk-7C2JPQDH.js → chunk-TJHQJD4R.js} +7 -7
- package/dist/production/dom-export.js +28 -28
- package/dist/production/dom-export.mjs +3 -3
- package/dist/production/{index-react-server-client-CK5fBojp.d.ts → index-react-server-client-BS5F89FR.d.ts} +9 -1
- package/dist/production/{index-react-server-client-DwQvbs9m.d.mts → index-react-server-client-DY04-103.d.mts} +9 -1
- package/dist/production/index-react-server-client.d.mts +1 -1
- package/dist/production/index-react-server-client.d.ts +1 -1
- package/dist/production/index-react-server-client.js +4 -4
- package/dist/production/index-react-server-client.mjs +2 -2
- package/dist/production/index-react-server.js +4 -4
- package/dist/production/index-react-server.mjs +4 -4
- package/dist/production/index.d.mts +31 -6
- package/dist/production/index.d.ts +31 -6
- package/dist/production/index.js +101 -100
- package/dist/production/index.mjs +3 -3
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,55 @@
|
|
|
1
1
|
# `react-router`
|
|
2
2
|
|
|
3
|
+
## v7.15.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Update router to operate on fetcher Maps in an immutable manner to avoid delayed React renders from potentially reading an updated but not yet committed Map. This could result in brief flickers in some fetcher-driven optimistic UI scenarios. ([6bf91ce](https://github.com/remix-run/react-router/commit/6bf91ce))
|
|
8
|
+
- Fix `serverLoader()` returning stale SSR data when a client navigation aborts pending hydration before the hydration `clientLoader` resolves ([#15022](https://github.com/remix-run/react-router/pull/15022))
|
|
9
|
+
- Fix `RouterProvider` `onError` callback not being called for synchronous initial loader errors in SPA mode ([#14942](https://github.com/remix-run/react-router/pull/14942))
|
|
10
|
+
- Memoize `useFetchers` to return a stable identity and only change if fetchers changed ([#15028](https://github.com/remix-run/react-router/pull/15028))
|
|
11
|
+
- Internal refactor to consolidate mutation request detection through shared utility ([#15033](https://github.com/remix-run/react-router/pull/15033))
|
|
12
|
+
|
|
13
|
+
### Unstable Changes
|
|
14
|
+
|
|
15
|
+
⚠️ _[Unstable features](https://reactrouter.com/community/api-development-strategy#unstable-flags) are not recommended for production use_
|
|
16
|
+
|
|
17
|
+
- Add a new `unstable_useRouterState()` hook that consolidates access to active and pending router states (RFC: #12358) ([4322e58](https://github.com/remix-run/react-router/commit/4322e58))
|
|
18
|
+
|
|
19
|
+
- Data/Framework/RSC only — throws when used without a data router
|
|
20
|
+
- This should allow you to consolidate usages of the following hooks which will likely be deprecated and removed in a future major version
|
|
21
|
+
- `useLocation`
|
|
22
|
+
- `useSearchParams`
|
|
23
|
+
- `useParams`
|
|
24
|
+
- `useMatches`
|
|
25
|
+
- `useNavigationType`
|
|
26
|
+
- `useNavigation`
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
let { active, pending } = unstable_useRouterState();
|
|
30
|
+
|
|
31
|
+
// Active is always populated with the current location
|
|
32
|
+
active.location; // replaces `useLocation()`
|
|
33
|
+
active.searchParams; // replaces `useSearchParams()[0]`
|
|
34
|
+
active.params; // replaces `useParams()`
|
|
35
|
+
active.matches; // replaces `useMatches()`
|
|
36
|
+
active.type; // replaces `useNavigationType()`
|
|
37
|
+
|
|
38
|
+
// Pending is only populated during a navigation
|
|
39
|
+
pending.location; // replaces `useNavigation().location`
|
|
40
|
+
pending.searchParams; // equivalent to `new URLSearchParams(useNavigation().search)`
|
|
41
|
+
pending.params; // Not directly accessible today
|
|
42
|
+
pending.matches; // Not directly accessible today
|
|
43
|
+
pending.type; // Not directly accessible today
|
|
44
|
+
pending.state; // replaces `useNavigation().state`
|
|
45
|
+
pending.formMethod; // replaces useNavigation().formMethod
|
|
46
|
+
pending.formAction; // replaces useNavigation().formAction
|
|
47
|
+
pending.formEncType; // replaces useNavigation().formEncType
|
|
48
|
+
pending.formData; // replaces useNavigation().formData
|
|
49
|
+
pending.json; // replaces useNavigation().json
|
|
50
|
+
pending.text; // replaces useNavigation().text
|
|
51
|
+
```
|
|
52
|
+
|
|
3
53
|
## v7.15.0
|
|
4
54
|
|
|
5
55
|
### Minor Changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-abc385596
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkWXPXGSJWjs = require('./chunk-WXPXGSJW.js');
|
|
18
18
|
|
|
19
19
|
// lib/dom/ssr/hydration.tsx
|
|
20
20
|
function getHydrationData({
|
|
@@ -29,12 +29,12 @@ function getHydrationData({
|
|
|
29
29
|
...state,
|
|
30
30
|
loaderData: { ...state.loaderData }
|
|
31
31
|
};
|
|
32
|
-
let initialMatches =
|
|
32
|
+
let initialMatches = _chunkWXPXGSJWjs.matchRoutes.call(void 0, routes, location, basename);
|
|
33
33
|
if (initialMatches) {
|
|
34
34
|
for (let match of initialMatches) {
|
|
35
35
|
let routeId = match.route.id;
|
|
36
36
|
let routeInfo = getRouteInfo(routeId);
|
|
37
|
-
if (
|
|
37
|
+
if (_chunkWXPXGSJWjs.shouldHydrateRouteLoader.call(void 0,
|
|
38
38
|
routeId,
|
|
39
39
|
routeInfo.clientLoader,
|
|
40
40
|
routeInfo.hasLoader,
|
|
@@ -112,7 +112,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
);
|
|
115
|
-
if (
|
|
115
|
+
if (_chunkWXPXGSJWjs.isRouteErrorResponse.call(void 0, error)) {
|
|
116
116
|
return /* @__PURE__ */ _react2.default.createElement(
|
|
117
117
|
ErrorWrapper,
|
|
118
118
|
{
|
|
@@ -120,7 +120,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
120
120
|
title: "Unhandled Thrown Response!"
|
|
121
121
|
},
|
|
122
122
|
/* @__PURE__ */ _react2.default.createElement("h1", { style: { fontSize: "24px" } }, error.status, " ", error.statusText),
|
|
123
|
-
|
|
123
|
+
_chunkWXPXGSJWjs.ENABLE_DEV_WARNINGS ? heyDeveloper : null
|
|
124
124
|
);
|
|
125
125
|
}
|
|
126
126
|
let errorInstance;
|
|
@@ -146,7 +146,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
146
146
|
function RSCDefaultRootErrorBoundary({
|
|
147
147
|
hasRootLayout
|
|
148
148
|
}) {
|
|
149
|
-
let error =
|
|
149
|
+
let error = _chunkWXPXGSJWjs.useRouteError.call(void 0, );
|
|
150
150
|
if (hasRootLayout === void 0) {
|
|
151
151
|
throw new Error("Missing 'hasRootLayout' prop");
|
|
152
152
|
}
|