Uh oh!
There was an error while loading. Please reload this page.
[Flight] Allow cyclic references to be serialized when unwrapping lazy elements - #35471
Conversation
Fails with: ``` TypeError: Converting circular structure to JSON --> starting at object with constructor 'Object' --- property 'self' closes the circle ```
react-sizebot
commented
Jan 8, 2026
Comparing: d6cae44...ee803e6 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
Requires a fix in React to pass (possibly react/react#35471). closes#86401
gnoff
left a comment
There was a problem hiding this comment.
This forks the handling of lazy object rendering depending on whether it is outlined or inlined. But I think this is right. If you inline the lazy then you want to preserve the chain of object deduplication through this boundary and thus need the parent property and key. If you are outlining the lazy then you can't preserve the chain and you just rend from a new root. I don't know why it was inlined with an empty root in the first place.
Uh oh!
There was an error while loading. Please reload this page.
…y elements (react#35471) When `renderModelDestructive` unwraps a lazy element and subsequently calls `renderModelDestructive` again with the resolved model, we should preserve the parent connection so that cyclic references can be serialized properly. This can occur in an advanced scenario where the result from the Flight Client is serialized again with the Flight Server, e.g. for slicing a precomputed payload into multiple parts. Note: The added test only fails when run with `--prod`. In dev mode, the component info outlining prevents the issue from occurring. DiffTrain build for [6baff7a](react@6baff7a)
When
renderModelDestructiveunwraps a lazy element and subsequently callsrenderModelDestructiveagain with the resolved model, we should preserve the parent connection so that cyclic references can be serialized properly. This can occur in an advanced scenario where the result from the Flight Client is serialized again with the Flight Server, e.g. for slicing a precomputed payload into multiple parts.Note: The added test only fails when run with
--prod. In dev mode, the component info outlining prevents the issue from occurring.