mirror of
https://github.com/facebook/react.git
synced 2026-02-25 22:55:39 +00:00
* Add feature flag * Split stack from current fiber You can get stack from any fiber, not just current. * Refactor description of component frames These should use fiber tags for switching. This also puts the relevant code behind DEV flags. * We no longer expose StrictMode in component stacks They're not super useful and will go away later anyway. * Update tests Context is no longer part of SSR stacks. This was already the case on the client. forwardRef no longer is wrapped on the stack. It's still in getComponentName but it's probably just noise in stacks. Eventually we'll remove the wrapper so it'll go away anyway. If we use native stack frames they won't have this extra wrapper. It also doesn't pick up displayName from the outer wrapper. We could maybe transfer it but this will also be fixed by removing the wrapper. * Forward displayName onto the inner function for forwardRef and memo in DEV This allows them to show up in stack traces. I'm not doing this for lazy because lazy is supposed to be called on the consuming side so you shouldn't assign it a name on that end. Especially not one that mutates the inner. * Use multiple instances of the fake component We mutate the inner component for its name so we need multiple copies.