Skip to content
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

Open
wants to merge 18 commits into
base: dev
Choose a base branch
from
Open

Conversation

markdalgleish
Copy link
Member

@markdalgleish markdalgleish commented Oct 14, 2024

See changeset and docs for more details.

Copy link

changeset-bot bot commented Oct 14, 2024

🦋 Changeset detected

Latest commit: ec9aa74

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 19 packages
Name Type
@remix-run/dev Minor
@remix-run/fs-routes Major
@remix-run/route-config Major
@remix-run/routes-option-adapter Major
create-remix Minor
remix Minor
@remix-run/architect Minor
@remix-run/cloudflare Minor
@remix-run/cloudflare-pages Minor
@remix-run/cloudflare-workers Minor
@remix-run/css-bundle Minor
@remix-run/deno Minor
@remix-run/eslint-config Minor
@remix-run/express Minor
@remix-run/node Minor
@remix-run/react Minor
@remix-run/serve Minor
@remix-run/server-runtime Minor
@remix-run/testing Minor

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

@markdalgleish markdalgleish changed the base branch from main to dev October 14, 2024 00:46
@markdalgleish markdalgleish changed the title WIP: Add support for routes.ts Add unstable support for routes.ts Oct 18, 2024
@markdalgleish markdalgleish marked this pull request as ready for review October 18, 2024 05:17
Comment on lines +8 to +20
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";
Copy link
Member Author

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants