Skip to content

Commit

Permalink
chore: update future example
Browse files Browse the repository at this point in the history
  • Loading branch information
Daydreamer-riri committed Dec 8, 2024
1 parent 5e88714 commit c2c4347
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 18 deletions.
3 changes: 2 additions & 1 deletion examples/lazy-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
},
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react-dom": "^18.2.0",
"react-helmet-async": "1.3.0"
},
"devDependencies": {
"vite": "catalog:",
Expand Down
3 changes: 2 additions & 1 deletion examples/lazy-pages/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ const Layout = React.lazy(() => import('./Layout'))
export const routes: RouteRecord[] = [
{
path: '/',
element: <Layout />,
Component: Layout,
HydrateFallback: Layout,
children: [
{
path: 'a',
Expand Down
8 changes: 8 additions & 0 deletions examples/lazy-pages/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,13 @@ export const createRoot = ViteReactSSG(
{
routes,
basename: import.meta.env.BASE_URL,
future: {
v7_normalizeFormMethod: true,
v7_startTransition: true,
v7_fetcherPersist: true,
v7_relativeSplatPath: true,
v7_skipActionErrorRevalidation: true,
v7_partialHydration: true,
},
},
)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
"prettier": "^3.3.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.26.2",
"react-router-dom": "^6.28.0",
"rimraf": "5.0.1",
"styled-components": "6.0.5",
"typescript": "^5.6.2",
Expand Down
33 changes: 18 additions & 15 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c2c4347

Please sign in to comment.