@tschk/moonshine-react-router 0.4.4 → 0.4.49
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/README.md +10 -2
- package/package.json +3 -3
- package/src/responses.ts +1 -2
package/README.md
CHANGED
|
@@ -50,6 +50,13 @@ import { json, redirect } from "@tschk/moonshine-react-router/server";
|
|
|
50
50
|
- `json`, `data`, `redirect`, `redirectDocument`, `replace`, `ErrorResponse`,
|
|
51
51
|
`isRouteErrorResponse`.
|
|
52
52
|
|
|
53
|
+
`data(payload, init)` keeps the payload unencoded for native server renderers
|
|
54
|
+
and applies status/headers to the rendered response before `after` middleware.
|
|
55
|
+
Loader metadata merges in layout-to-page order; explicit action metadata wins.
|
|
56
|
+
Cookies remain separate fields. Returned or thrown `Response` objects retain
|
|
57
|
+
precedence, and thrown data wrappers are unsupported. This does not add client
|
|
58
|
+
loader hooks or the React Router data router.
|
|
59
|
+
|
|
53
60
|
## Not supported
|
|
54
61
|
|
|
55
62
|
These need react-router's own data router or build plugin and are **not**
|
|
@@ -57,8 +64,9 @@ provided — do not expect them to work by aliasing:
|
|
|
57
64
|
|
|
58
65
|
- **Data APIs**: `useLoaderData`, `useActionData`, `useFetcher`,
|
|
59
66
|
`useRevalidator`, `useSubmit`, `useNavigation`, `useBlocker`,
|
|
60
|
-
`unstable_usePrompt`, `defer`/`Await`.
|
|
61
|
-
|
|
67
|
+
`unstable_usePrompt`, `defer`/`Await`. These client lifecycles are not wired in
|
|
68
|
+
the adapter. Moonshine server routes have loaders/actions, but their results
|
|
69
|
+
are not exposed through React Router client hooks.
|
|
62
70
|
- **Route configuration**: `createBrowserRouter`, `RouterProvider`, `Routes`,
|
|
63
71
|
`Route`, `createRoutesFromElements`, nested route matching. Moonshine matches
|
|
64
72
|
a flat route table via `MoonshineRouter`; `<Outlet>` is fed explicitly by
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tschk/moonshine-react-router",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.49",
|
|
4
4
|
"description": "react-router / Remix client API reimplemented on moonshine — drop react-router, keep the imports",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"type": "module",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"./aliases": "./src/aliases.ts"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@tschk/moonshine": "^0.4.
|
|
21
|
-
"@tschk/moonshine-router": "^0.4.
|
|
20
|
+
"@tschk/moonshine": "^0.4.48",
|
|
21
|
+
"@tschk/moonshine-router": "^0.4.48"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"react": ">=18",
|
package/src/responses.ts
CHANGED