zudoku 0.0.0-f9d5b02 → 0.0.0-fd8f8ad
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/dist/app/entry.client.js +14 -0
- package/dist/app/entry.client.js.map +1 -1
- package/dist/lib/components/Bootstrap.js +9 -3
- package/dist/lib/components/Bootstrap.js.map +1 -1
- package/lib/zudoku.components.js +83 -69
- package/lib/zudoku.components.js.map +1 -1
- package/package.json +2 -2
- package/src/app/entry.client.tsx +14 -0
- package/src/lib/components/Bootstrap.tsx +15 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zudoku",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-fd8f8ad",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"homepage": "https://zudoku.dev",
|
|
6
6
|
"repository": {
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
"@types/react": "18.3.11",
|
|
142
142
|
"@types/react-dom": "18.3.1",
|
|
143
143
|
"@vitejs/plugin-react": "4.3.1",
|
|
144
|
-
"@zudoku/config": "0.0.0-
|
|
144
|
+
"@zudoku/config": "0.0.0-fd8f8ad",
|
|
145
145
|
"@zudoku/httpsnippet": "10.0.9",
|
|
146
146
|
"@zudoku/react-helmet-async": "2.0.4",
|
|
147
147
|
"autoprefixer": "10.4.20",
|
package/src/app/entry.client.tsx
CHANGED
|
@@ -38,6 +38,13 @@ async function hydrateLazyRoutes(routes: RouteObject[]) {
|
|
|
38
38
|
function render(routes: RouteObject[]) {
|
|
39
39
|
const router = createBrowserRouter(routes, {
|
|
40
40
|
basename: config.basePath,
|
|
41
|
+
future: {
|
|
42
|
+
v7_relativeSplatPath: true,
|
|
43
|
+
v7_fetcherPersist: true,
|
|
44
|
+
v7_partialHydration: true,
|
|
45
|
+
v7_skipActionErrorRevalidation: true,
|
|
46
|
+
v7_normalizeFormMethod: true,
|
|
47
|
+
},
|
|
41
48
|
});
|
|
42
49
|
createRoot(root).render(<Bootstrap router={router} />);
|
|
43
50
|
}
|
|
@@ -46,6 +53,13 @@ async function hydrate(routes: RouteObject[]) {
|
|
|
46
53
|
await hydrateLazyRoutes(routes);
|
|
47
54
|
const router = createBrowserRouter(routes, {
|
|
48
55
|
basename: config.basePath,
|
|
56
|
+
future: {
|
|
57
|
+
v7_relativeSplatPath: true,
|
|
58
|
+
v7_fetcherPersist: true,
|
|
59
|
+
v7_partialHydration: true,
|
|
60
|
+
v7_skipActionErrorRevalidation: true,
|
|
61
|
+
v7_normalizeFormMethod: true,
|
|
62
|
+
},
|
|
49
63
|
});
|
|
50
64
|
|
|
51
65
|
hydrateRoot(root, <Bootstrap hydrate router={router} />);
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
QueryClientProvider,
|
|
5
5
|
} from "@tanstack/react-query";
|
|
6
6
|
import { type HelmetData, HelmetProvider } from "@zudoku/react-helmet-async";
|
|
7
|
-
import { StrictMode,
|
|
7
|
+
import { StrictMode, useState } from "react";
|
|
8
8
|
import { type createBrowserRouter, RouterProvider } from "react-router-dom";
|
|
9
9
|
import {
|
|
10
10
|
type createStaticRouter,
|
|
@@ -20,7 +20,16 @@ const Bootstrap = ({
|
|
|
20
20
|
hydrate?: boolean;
|
|
21
21
|
router: ReturnType<typeof createBrowserRouter>;
|
|
22
22
|
}) => {
|
|
23
|
-
const queryClient =
|
|
23
|
+
const [queryClient] = useState(
|
|
24
|
+
() =>
|
|
25
|
+
new QueryClient({
|
|
26
|
+
defaultOptions: {
|
|
27
|
+
queries: {
|
|
28
|
+
staleTime: 1000 * 60 * 5,
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
}),
|
|
32
|
+
);
|
|
24
33
|
|
|
25
34
|
return (
|
|
26
35
|
<StrictMode>
|
|
@@ -28,7 +37,10 @@ const Bootstrap = ({
|
|
|
28
37
|
<HydrationBoundary state={hydrate ? (window as any).DATA : undefined}>
|
|
29
38
|
<HelmetProvider>
|
|
30
39
|
<StaggeredRenderContext.Provider value={{ stagger: !hydrate }}>
|
|
31
|
-
<RouterProvider
|
|
40
|
+
<RouterProvider
|
|
41
|
+
router={router}
|
|
42
|
+
future={{ v7_startTransition: true }}
|
|
43
|
+
/>
|
|
32
44
|
</StaggeredRenderContext.Provider>
|
|
33
45
|
</HelmetProvider>
|
|
34
46
|
</HydrationBoundary>
|