diff --git a/examples/react-server/src/entry-browser.tsx b/examples/react-server/src/entry-browser.tsx index 89bc54a6..b3656c16 100644 --- a/examples/react-server/src/entry-browser.tsx +++ b/examples/react-server/src/entry-browser.tsx @@ -85,7 +85,7 @@ async function main() { ReactDOMClient.createRoot(document).render(reactRootEl); } else { // TODO: can we avoid await? (separate script stream?) - const formState = (await initialStreamData).actionResult; + const formState = (await initialStreamData).actionResult as any; React.startTransition(() => { ReactDOMClient.hydrateRoot(document, reactRootEl, { formState, diff --git a/examples/react-server/src/entry-ssr.tsx b/examples/react-server/src/entry-ssr.tsx index 002aa6d4..7e537ac8 100644 --- a/examples/react-server/src/entry-ssr.tsx +++ b/examples/react-server/src/entry-ssr.tsx @@ -31,9 +31,8 @@ async function renderHtml(request: Request, result: ReactServerHandlerResult) { const rscPromise = ReactClient.createFromReadableStream( rscStream1, { - ssrManifest: { + serverConsumerManifest: { moduleMap: createModuleMap(), - moduleLoading: null, }, }, ); diff --git a/examples/react-server/src/features/router/client.tsx b/examples/react-server/src/features/router/client.tsx index 99d9bc4d..5dca39a5 100644 --- a/examples/react-server/src/features/router/client.tsx +++ b/examples/react-server/src/features/router/client.tsx @@ -6,9 +6,9 @@ export function Link({ activeProps, pendingProps, ...props -}: JSX.IntrinsicElements["a"] & { - activeProps?: JSX.IntrinsicElements["a"]; - pendingProps?: JSX.IntrinsicElements["a"]; +}: React.JSX.IntrinsicElements["a"] & { + activeProps?: React.JSX.IntrinsicElements["a"]; + pendingProps?: React.JSX.IntrinsicElements["a"]; }) { const { isPending, pathname } = useRouter(); diff --git a/examples/react-server/src/types/index.ts b/examples/react-server/src/types/index.ts index a3ccc3d8..687cfc6a 100644 --- a/examples/react-server/src/types/index.ts +++ b/examples/react-server/src/types/index.ts @@ -23,7 +23,8 @@ export type ModuleMap = { export interface SsrManifest { moduleMap: ModuleMap; // TODO - moduleLoading: null; + serverModuleMap?: unknown; + moduleLoading?: unknown; } export type WebpackRequire = (id: string) => Promise; diff --git a/examples/react-server/src/types/react-modules.d.ts b/examples/react-server/src/types/react-modules.d.ts index 7a8ce660..c73ab9d1 100644 --- a/examples/react-server/src/types/react-modules.d.ts +++ b/examples/react-server/src/types/react-modules.d.ts @@ -35,7 +35,7 @@ declare module "react-server-dom-webpack/server.edge" { actionResult: unknown, body: FormData, serverManifest?: unknown, - ): Promise; + ): Promise; } // https://github.com/facebook/react/blob/89021fb4ec9aa82194b0788566e736a4cedfc0e4/packages/react-server-dom-webpack/src/ReactFlightDOMClientEdge.js @@ -48,7 +48,7 @@ declare module "react-server-dom-webpack/client.edge" { export function createFromReadableStream( stream: ReadableStream, options: { - ssrManifest: import(".").SsrManifest; + serverConsumerManifest: import(".").SsrManifest; }, ): Promise; } diff --git a/examples/react-server/src/types/react.ts b/examples/react-server/src/types/react.ts index 99b32fd6..09449eed 100644 --- a/examples/react-server/src/types/react.ts +++ b/examples/react-server/src/types/react.ts @@ -6,13 +6,3 @@ declare module "react-dom/server" { formState: unknown; } } - -declare module "react-dom/client" { - interface HydrationOptions { - formState: unknown; - } - - interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_CREATE_ROOT_CONTAINERS { - Document: Document; - } -}