SIGN IN SIGN UP
facebook / react UNCLAIMED

The library for web and native user interfaces.

0 0 0 JavaScript

Use both displayName and name in forwardRef/memo (#29625)

When defining a displayName on forwardRef/memo we forward that name to
the inner function.

We used to use displayName for this but in #29206 I switched this to use
`"name"`. That's because V8 doesn't use displayName, it only uses the
overridden name in stack traces. This is the only thing covered by our
tests for component stacks.

However, I realized that Safari only uses displayName and not the name.
So this sets both.
S
Sebastian Markbåge committed
63d673c67656390d776bfa082c6ab49f0c636582
Parent: 8fd963a
Committed by GitHub <[email protected]> on 5/31/2024, 4:22:22 AM