-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add unstable support for routes.ts
#10107
base: dev
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: ec9aa74 The changes in this PR will be included in the next version bump. This PR includes changesets to release 19 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
routes.ts
routes.ts
export type { | ||
DefineRoutesFunction as UNSAFE_DefineRoutesFunction, | ||
RouteManifest as UNSAFE_RouteManifest, | ||
RouteManifestEntry as UNSAFE_RouteManifestEntry, | ||
RouteConfig as UNSAFE_RouteConfig, | ||
RouteConfigEntry as UNSAFE_RouteConfigEntry, | ||
} from "./config/routes"; | ||
export { | ||
defineRoutes as UNSAFE_defineRoutes, | ||
routeManifestToRouteConfig as UNSAFE_routeManifestToRouteConfig, | ||
getRouteConfigAppDirectory as UNSAFE_getRouteConfigAppDirectory, | ||
} from "./config/routes"; | ||
export { flatRoutes as UNSAFE_flatRoutes } from "./config/flat-routes"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't needed in React Router because @remix-run/dev/routes
has access to the internals of the dev package, whereas in this case we need to expose these internals across package boundaries.
@@ -476,6 +476,143 @@ You may find some usage for the new [`<Link discover>`][discover-prop] API if yo | |||
|
|||
Opt into automatic [dependency optimization][dependency-optimization] during development. This flag will remain in an "unstable" state until React Router v7 so you do not need to adopt this in your Remix v2 app prior to upgrading to React Router v7. | |||
|
|||
## routes.ts | |||
|
|||
Config-based routing is the new default in React Router v7. Support for `routes.ts` and its related APIs in Remix are designed as a migration path to help minimize the number changes required when moving your Remix project over to React Router v7. Since React Router v7 is not yet stable, these APIs are also considered unstable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Config-based routing is the new default in React Router v7. Support for `routes.ts` and its related APIs in Remix are designed as a migration path to help minimize the number changes required when moving your Remix project over to React Router v7. Since React Router v7 is not yet stable, these APIs are also considered unstable. | |
Config-based routing is the new default in React Router v7. Support for `routes.ts` and its related APIs in Remix are designed as a migration path to help minimize the number of changes required when moving your Remix project over to React Router v7. Since React Router v7 is not yet stable, these APIs are also considered unstable. |
See changeset and docs for more details.