Skip to content

Commit

Permalink
chore: Opt-in React Router v7 features
Browse files Browse the repository at this point in the history
Preparations for React Router v7, opts-in the new features to avoid warnings in console.

Related-to vaadin/flow#20527
  • Loading branch information
mshabarov committed Nov 27, 2024
1 parent e2af537 commit e9b63dc
Showing 1 changed file with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,22 @@ export class RouterConfigurationBuilder {

return {
routes,
router: createBrowserRouter([...routes], { basename: new URL(document.baseURI).pathname, ...options }),
router: createBrowserRouter([...routes], {
basename: new URL(document.baseURI).pathname,
future: {
// eslint-disable-next-line camelcase
v7_fetcherPersist: true,
// eslint-disable-next-line camelcase
v7_normalizeFormMethod: true,
// eslint-disable-next-line camelcase
v7_partialHydration: true,
// eslint-disable-next-line camelcase
v7_relativeSplatPath: true,
// eslint-disable-next-line camelcase
v7_skipActionErrorRevalidation: true,
},
...options,
}),
};
}

Expand Down

0 comments on commit e9b63dc

Please sign in to comment.