dillon1000/react
Commit
Browse files Encode better error messages when part of the context is a client reference (#28355)
Alternative to #28354. If a client reference is one of the props being describes as part of another error, we call toString on it, which errors. We should error explicitly when a Symbol prop is extracted. However, pragmatically I added the toString symbol tag even though we don't know what the real tostring will be but we also lie about the typeof. We can however in addition to this give it a different description because describing this property as an object isn't quite right. We probably could extract the export name but that's kind of renderer specific and I just added this shared module to Fizz which doesn't have that which is unfortunate an consequence. For default exports we don't have a good name of what the alias was in the receiver. Could maybe call it "default" but for now I just call it "client".
Changed paths4 files
First-parent comparisonpackages/react-server-dom-turbopack/src/ReactFlightTurbopackReferences.js ModifiedM packages/react-server-dom-webpack/src/ReactFlightWebpackReferences.js ModifiedM packages/react-server-dom-webpack/src/__tests__/ReactFlightDOM-test.js ModifiedM packages/shared/ReactSerializationErrors.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…