@@ -379,6 +379,7 @@ export async function handleAction({
379379 requestStore,
380380 serverActions,
381381 ctx,
382+ temporaryReferences,
382383} : {
383384 req : BaseNextRequest
384385 res : BaseNextResponse
@@ -389,6 +390,7 @@ export async function handleAction({
389390 requestStore : RequestStore
390391 serverActions ?: ServerActionsConfig
391392 ctx : AppRenderContext
393+ temporaryReferences : import ( 'react-dom/server.edge' ) . TemporaryReferencesSet
392394} ) : Promise <
393395 | undefined
394396 | {
@@ -398,9 +400,6 @@ export async function handleAction({
398400 type : 'done'
399401 result : RenderResult | undefined
400402 formState ?: any
401- temporaryReferences :
402- | import ( 'react-dom/server.edge' ) . TemporaryReferencesSet
403- | undefined
404403 }
405404> {
406405 const contentType = req . headers [ 'content-type' ]
@@ -516,7 +515,6 @@ export async function handleAction({
516515 // if the page was not revalidated, we can skip the rendering the flight tree
517516 skipFlight : ! staticGenerationStore . pathWasRevalidated ,
518517 } ) ,
519- temporaryReferences : undefined ,
520518 }
521519 }
522520
@@ -558,14 +556,10 @@ export async function handleAction({
558556 ctx . renderOpts . basePath ,
559557 staticGenerationStore
560558 ) ,
561- temporaryReferences : undefined ,
562559 }
563560 }
564561 }
565562
566- let temporaryReferences :
567- | import ( 'react-dom/server.edge' ) . TemporaryReferencesSet
568- | undefined
569563 try {
570564 await actionAsyncStorage . run ( { isAction : true } , async ( ) => {
571565 if (
@@ -575,16 +569,10 @@ export async function handleAction({
575569 isWebNextRequest ( req )
576570 ) {
577571 // Use react-server-dom-webpack/server.edge
578- const {
579- createTemporaryReferenceSet,
580- decodeReply,
581- decodeAction,
582- decodeFormState,
583- } = ComponentMod
572+ const { decodeReply, decodeAction, decodeFormState } = ComponentMod
584573 if ( ! req . body ) {
585574 throw new Error ( 'invariant: Missing request body.' )
586575 }
587- temporaryReferences = createTemporaryReferenceSet ( )
588576
589577 // TODO: add body limit
590578
@@ -650,13 +638,11 @@ export async function handleAction({
650638 ) {
651639 // Use react-server-dom-webpack/server.node which supports streaming
652640 const {
653- createTemporaryReferenceSet,
654641 decodeReply,
655642 decodeReplyFromBusboy,
656643 decodeAction,
657644 decodeFormState,
658645 } = require ( `./react-server.node` )
659- temporaryReferences = createTemporaryReferenceSet ( )
660646
661647 const { Transform } =
662648 require ( 'node:stream' ) as typeof import ( 'node:stream' )
@@ -827,7 +813,6 @@ export async function handleAction({
827813 type : 'done' ,
828814 result : actionResult ,
829815 formState,
830- temporaryReferences,
831816 }
832817 } catch ( err ) {
833818 if ( isRedirectError ( err ) ) {
@@ -854,7 +839,6 @@ export async function handleAction({
854839 ctx . renderOpts . basePath ,
855840 staticGenerationStore
856841 ) ,
857- temporaryReferences : undefined ,
858842 }
859843 }
860844
@@ -900,7 +884,6 @@ export async function handleAction({
900884 actionResult : promise ,
901885 asNotFound : true ,
902886 } ) ,
903- temporaryReferences,
904887 }
905888 }
906889 return {
@@ -935,7 +918,6 @@ export async function handleAction({
935918 skipFlight :
936919 ! staticGenerationStore . pathWasRevalidated || actionWasForwarded ,
937920 } ) ,
938- temporaryReferences,
939921 }
940922 }
941923
0 commit comments