Skip to content

Commit a5dc246

Browse files
authored
feat(router): re-export Routes and Route from react-router (#4720)
1 parent e34975c commit a5dc246

3 files changed

Lines changed: 19 additions & 13 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@equinor/fusion-framework-react-router": minor
3+
---
4+
5+
Expose `Routes` and `Route` as public exports from `@equinor/fusion-framework-react-router` for compatibility, and mark them as deprecated in favor of the Fusion route DSL or `RouteObject`-based routing.

.changesets/host-flag-for-app-dev.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

packages/react/router/src/index.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { Route as ReactRouterRoute, Routes as ReactRouterRoutes } from 'react-router';
2+
13
export { Router } from './Router.js';
24
export { FusionRouterContextProvider, routerContext, useRouterContext } from './context.js';
35
export type { RouteSchemaEntry } from './routes/to-route-schema.js';
@@ -46,3 +48,15 @@ export {
4648
useSearchParams,
4749
useSubmit,
4850
} from 'react-router';
51+
52+
/**
53+
* Use Fusion route schema DSL or RouteObject-based routing instead of React Router `<Routes>`.
54+
* @deprecated Please use Fusion DSL or RouteObject instead.
55+
*/
56+
export const Routes: typeof ReactRouterRoutes = ReactRouterRoutes;
57+
58+
/**
59+
* Use Fusion route schema DSL or RouteObject-based routing instead of React Router `<Route>`.
60+
* @deprecated Please use Fusion DSL or RouteObject instead.
61+
*/
62+
export const Route: typeof ReactRouterRoute = ReactRouterRoute;

0 commit comments

Comments
 (0)