-
Notifications
You must be signed in to change notification settings - Fork 46.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DevTools: Memo(ForwardRef()) and "Rendered By" List #18571
Comments
It's especially bad because it breaks the "rendered by" chain for inner trees. They "stop" at the inner memo() content (unless it's SimpleMemo). I think this might also be why RN inspector sometimes shows trees that stop abruptly without going all the way up to the root. |
I think this not only happens in forwardRef, any non simple component wrapped in memo will have this issue. for example memo(class Component). I'd like to work on this. I think the issue lies here potentially https://github.com/facebook/react/blob/master/packages/react-reconciler/src/ReactFiberBeginWork.new.js#L421 Let me know if that's ok thanks. |
@hanq08 If you're interested in working on this, we'd welcome a PR. |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment! |
bump |
If you have
memo(forwardRef(X))
, then the inner component won't have a "rendered by" list. This is because it technically doesn't have an owner. It is artificial.I think we should ideally set up
_debugOwner
for these Fibers in DEV just so existing tooling can find them. Or special case them in DevTools.The text was updated successfully, but these errors were encountered: