Skip to content

chore: mark new APIs as unstable #13685

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

Merged
merged 2 commits into from
May 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions integration/helpers/rsc-parcel/src/entry.browser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import * as React from "react";
import { hydrateRoot } from "react-dom/client";
import {
createCallServer,
getServerStream,
RSCHydratedRouter,
unstable_createCallServer as createCallServer,
unstable_getServerStream as getServerStream,
unstable_RSCHydratedRouter as RSCHydratedRouter,
} from "react-router";
import type { ServerPayload } from "react-router/rsc";
import type { unstable_ServerPayload as ServerPayload } from "react-router/rsc";
import {
createFromReadableStream,
encodeReply,
Expand Down
6 changes: 3 additions & 3 deletions integration/helpers/rsc-parcel/src/entry.rsc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import {
// @ts-expect-error
} from "react-server-dom-parcel/server.edge";
import {
type DecodeCallServerFunction,
type DecodeFormActionFunction,
matchRSCServerRequest,
type unstable_DecodeCallServerFunction as DecodeCallServerFunction,
type unstable_DecodeFormActionFunction as DecodeFormActionFunction,
unstable_matchRSCServerRequest as matchRSCServerRequest,
} from "react-router/rsc";

import { routes } from "./routes";
Expand Down
4 changes: 2 additions & 2 deletions integration/helpers/rsc-parcel/src/entry.ssr.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import express from "express";
// @ts-expect-error - no types
import { renderToReadableStream as renderHTMLToReadableStream } from "react-dom/server.edge" assert { env: "react-client" };
import {
routeRSCServerRequest,
RSCStaticRouter,
unstable_routeRSCServerRequest as routeRSCServerRequest,
unstable_RSCStaticRouter as RSCStaticRouter,
} from "react-router" assert { env: "react-client" };
// @ts-expect-error
import { createFromReadableStream } from "react-server-dom-parcel/client.edge" assert { env: "react-client" };
Expand Down
2 changes: 1 addition & 1 deletion integration/helpers/rsc-parcel/src/routes.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ServerRouteObject } from "react-router/rsc";
import type { unstable_ServerRouteObject as ServerRouteObject } from "react-router/rsc";

export const routes = [
{
Expand Down
12 changes: 6 additions & 6 deletions integration/helpers/rsc-vite/src/entry.browser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import {
import { manifest } from "virtual:react-manifest";

import {
type DecodeServerResponseFunction,
type EncodeActionFunction,
createCallServer,
getServerStream,
RSCHydratedRouter,
type unstable_DecodeServerResponseFunction as DecodeServerResponseFunction,
type unstable_EncodeActionFunction as EncodeActionFunction,
unstable_createCallServer as createCallServer,
unstable_getServerStream as getServerStream,
unstable_RSCHydratedRouter as RSCHydratedRouter,
} from "react-router";
import { type ServerPayload } from "react-router/rsc";
import { type unstable_ServerPayload as ServerPayload } from "react-router/rsc";

const encodeAction: EncodeActionFunction = (args: unknown[]) =>
encodeReply(args);
Expand Down
4 changes: 2 additions & 2 deletions integration/helpers/rsc-vite/src/entry.rsc.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// <reference types="@cloudflare/workers-types" />
import {
type DecodeCallServerFunction,
matchRSCServerRequest,
type unstable_DecodeCallServerFunction as DecodeCallServerFunction,
unstable_matchRSCServerRequest as matchRSCServerRequest,
} from "react-router/rsc";
// @ts-expect-error - no types yet
import { manifest } from "virtual:react-manifest";
Expand Down
5 changes: 4 additions & 1 deletion integration/helpers/rsc-vite/src/entry.ssr.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ import RDS from "react-dom/server.edge";
// @ts-expect-error
import { bootstrapModules, manifest } from "virtual:react-manifest";

import { routeRSCServerRequest, RSCStaticRouter } from "react-router";
import {
unstable_routeRSCServerRequest as routeRSCServerRequest,
unstable_RSCStaticRouter as RSCStaticRouter,
} from "react-router";

type CloudflareEnv = {
ASSETS: Fetcher;
Expand Down
2 changes: 1 addition & 1 deletion integration/helpers/rsc-vite/src/routes.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ServerRouteObject } from "react-router/rsc";
import type { unstable_ServerRouteObject as ServerRouteObject } from "react-router/rsc";

export const routes = [
{
Expand Down
4 changes: 2 additions & 2 deletions integration/rsc/rsc-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ implementations.forEach((implementation) => {
port,
files: {
"src/routes.ts": js`
import type { ServerRouteObject } from "react-router/rsc";
import type { unstable_ServerRouteObject as ServerRouteObject } from "react-router/rsc";

export const routes = [
{
Expand Down Expand Up @@ -338,7 +338,7 @@ implementations.forEach((implementation) => {
port,
files: {
"src/routes.ts": js`
import type { ServerRouteObject } from "react-router/rsc";
import type { unstable_ServerRouteObject as ServerRouteObject } from "react-router/rsc";

export const routes = [
{
Expand Down
2 changes: 2 additions & 0 deletions packages/react-router/dom-export.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client";

export type { RouterProviderProps } from "./lib/dom-export/dom-router-provider";
export { RouterProvider } from "./lib/dom-export/dom-router-provider";
export { HydratedRouter } from "./lib/dom-export/hydrated-router";
16 changes: 11 additions & 5 deletions packages/react-router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,18 @@ export { href } from "./lib/href";

// RSC
export type {
DecodeServerResponseFunction,
EncodeActionFunction,
DecodeServerResponseFunction as unstable_DecodeServerResponseFunction,
EncodeActionFunction as unstable_EncodeActionFunction,
} from "./lib/rsc/browser";
export { createCallServer, RSCHydratedRouter } from "./lib/rsc/browser";
export { routeRSCServerRequest, RSCStaticRouter } from "./lib/rsc/server.ssr";
export { getServerStream } from "./lib/rsc/html-stream/browser";
export {
createCallServer as unstable_createCallServer,
RSCHydratedRouter as unstable_RSCHydratedRouter,
} from "./lib/rsc/browser";
export {
routeRSCServerRequest as unstable_routeRSCServerRequest,
RSCStaticRouter as unstable_RSCStaticRouter,
} from "./lib/rsc/server.ssr";
export { getServerStream as unstable_getServerStream } from "./lib/rsc/html-stream/browser";

///////////////////////////////////////////////////////////////////////////////
// DANGER! PLEASE READ ME!
Expand Down
18 changes: 9 additions & 9 deletions packages/react-router/rsc-export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ export { createCookieSessionStorage } from "./lib/server-runtime/sessions/cookie
export { createMemorySessionStorage } from "./lib/server-runtime/sessions/memoryStorage";

export type {
DecodeCallServerFunction,
DecodeFormActionFunction,
ServerManifestPayload,
ServerMatch,
ServerPayload,
ServerRenderPayload,
DecodeCallServerFunction as unstable_DecodeCallServerFunction,
DecodeFormActionFunction as unstable_DecodeFormActionFunction,
ServerManifestPayload as unstable_ServerManifestPayload,
ServerMatch as unstable_ServerMatch,
ServerPayload as unstable_ServerPayload,
ServerRenderPayload as unstable_ServerRenderPayload,
RenderedRoute as ServerRouteManifest,
ServerRouteMatch,
ServerRouteObject,
ServerRouteMatch as unstable_ServerRouteMatch,
ServerRouteObject as unstable_ServerRouteObject,
} from "./lib/rsc/server.rsc";
export { matchRSCServerRequest } from "./lib/rsc/server.rsc";
export { matchRSCServerRequest as unstable_matchRSCServerRequest } from "./lib/rsc/server.rsc";
8 changes: 4 additions & 4 deletions playground/rsc-parcel/src/entry.browser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import * as React from "react";
import { hydrateRoot } from "react-dom/client";
import {
createCallServer,
getServerStream,
RSCHydratedRouter,
unstable_createCallServer as createCallServer,
unstable_getServerStream as getServerStream,
unstable_RSCHydratedRouter as RSCHydratedRouter,
} from "react-router";
import type { ServerPayload } from "react-router/rsc";
import type { unstable_ServerPayload as ServerPayload } from "react-router/rsc";
import {
createFromReadableStream,
encodeReply,
Expand Down
6 changes: 3 additions & 3 deletions playground/rsc-parcel/src/entry.rsc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import {
// @ts-expect-error
} from "react-server-dom-parcel/server.edge";
import {
type DecodeCallServerFunction,
type DecodeFormActionFunction,
matchRSCServerRequest,
type unstable_DecodeCallServerFunction as DecodeCallServerFunction,
type unstable_DecodeFormActionFunction as DecodeFormActionFunction,
unstable_matchRSCServerRequest as matchRSCServerRequest,
} from "react-router/rsc";

import { routes } from "./routes";
Expand Down
4 changes: 2 additions & 2 deletions playground/rsc-parcel/src/entry.ssr.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import express from "express";
// @ts-expect-error - no types
import { renderToReadableStream as renderHTMLToReadableStream } from "react-dom/server.edge" assert { env: "react-client" };
import {
routeRSCServerRequest,
RSCStaticRouter,
unstable_routeRSCServerRequest as routeRSCServerRequest,
unstable_RSCStaticRouter as RSCStaticRouter,
} from "react-router" assert { env: "react-client" };
// @ts-expect-error
import { createFromReadableStream } from "react-server-dom-parcel/client.edge" assert { env: "react-client" };
Expand Down
2 changes: 1 addition & 1 deletion playground/rsc-parcel/src/routes.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ServerRouteObject } from "react-router/rsc";
import type { unstable_ServerRouteObject as ServerRouteObject } from "react-router/rsc";

export const routes = [
{
Expand Down
12 changes: 6 additions & 6 deletions playground/rsc-vite/src/browser/entry.browser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import {
import { manifest } from "virtual:react-manifest";

import {
type DecodeServerResponseFunction,
type EncodeActionFunction,
createCallServer,
getServerStream,
RSCHydratedRouter,
type unstable_DecodeServerResponseFunction as DecodeServerResponseFunction,
type unstable_EncodeActionFunction as EncodeActionFunction,
unstable_createCallServer as createCallServer,
unstable_getServerStream as getServerStream,
unstable_RSCHydratedRouter as RSCHydratedRouter,
} from "react-router";
import { type ServerPayload } from "react-router/rsc";
import type { unstable_ServerPayload as ServerPayload } from "react-router/rsc";

const encodeAction: EncodeActionFunction = (args: unknown[]) =>
encodeReply(args);
Expand Down
2 changes: 1 addition & 1 deletion playground/rsc-vite/src/routes.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ServerRouteObject } from "react-router/rsc";
import type { unstable_ServerRouteObject as ServerRouteObject } from "react-router/rsc";

export const routes = [
{
Expand Down
4 changes: 2 additions & 2 deletions playground/rsc-vite/src/rsc/entry.rsc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { decodeReply, renderToReadableStream } from "../../framework/server";
import { manifest } from "virtual:react-manifest";

import {
type DecodeCallServerFunction,
matchRSCServerRequest,
type unstable_DecodeCallServerFunction as DecodeCallServerFunction,
unstable_matchRSCServerRequest as matchRSCServerRequest,
} from "react-router/rsc";

import { routes } from "../routes";
Expand Down
5 changes: 4 additions & 1 deletion playground/rsc-vite/src/ssr/entry.ssr.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ import RDS from "react-dom/server.edge";
// @ts-expect-error
import { bootstrapModules, manifest } from "virtual:react-manifest";

import { routeRSCServerRequest, RSCStaticRouter } from "react-router";
import {
unstable_routeRSCServerRequest as routeRSCServerRequest,
unstable_RSCStaticRouter as RSCStaticRouter,
} from "react-router";

type CloudflareEnv = {
ASSETS: Fetcher;
Expand Down
Loading