dillon1000/react

Commit

[Flight] Encode the name of a function as an object property (#30325)

Unfortunately, Firefox doesn't include the name of a function in stack
traces if you set it as either `.name` or `.displayName` at runtime.
Only if you include it declarative.

We also can't include it into a named function expression because not
all possible names are expressible declaratively. E.g. spaces or
punctuations.

However, we can express any name if it's an object property and since
object properties now give their name declarative to the function
defined inside of them, we can declaratively express any name this way.
Browse files
Changed paths1 file
First-parent comparison
M packages/react-client/src/ReactFlightClient.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…