Skip to content

Commit 0d74403

Browse files
committed
fix: fix temporary references
1 parent b2813d8 commit 0d74403

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

packages/plugin-rsc/examples/basic/src/framework/entry.rsc.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,12 @@ export async function handleRequest({
5656
}
5757

5858
const url = new URL(request.url)
59-
const rscStream = ReactServer.renderToReadableStream<RscPayload>({
60-
root: getRoot(),
61-
returnValue,
62-
formState,
63-
})
59+
const rscPayload: RscPayload = { root: getRoot(), formState, returnValue }
60+
const rscOptions = { temporaryReferences }
61+
const rscStream = ReactServer.renderToReadableStream<RscPayload>(
62+
rscPayload,
63+
rscOptions,
64+
)
6465

6566
// respond RSC stream without HTML rendering based on framework's convention.
6667
// here we use request header `content-type`.

0 commit comments

Comments
 (0)