Skip to content
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 Bug]: forwardRef components not marked as "rendered" if context changed #24428

Closed
eps1lon opened this issue Apr 23, 2022 · 3 comments · Fixed by #24494
Closed

[DevTools Bug]: forwardRef components not marked as "rendered" if context changed #24428

eps1lon opened this issue Apr 23, 2022 · 3 comments · Fixed by #24494

Comments

@eps1lon
Copy link
Collaborator

eps1lon commented Apr 23, 2022

Website or app

https://codesandbox.io/s/forwardref-context-change-did-not-render-lpdk4t?file=/src/index.js

Repro steps

  1. Goto https://lpdk4t.csb.app/
  2. Start profiling
  3. Enter "a" into the input
  4. Stop profiling
    forwardRef-did-not-render

How often does this bug happen?

Every time

DevTools package (automated)

No response

DevTools version (automated)

4.24.3-46a98cff2

Error message (automated)

No response

Error call stack (automated)

No response

Error component stack (automated)

No response

GitHub query string (automated)

No response

@eps1lon eps1lon added Type: Bug Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug Component: Developer Tools labels Apr 23, 2022
@JayKaku
Copy link

JayKaku commented Apr 23, 2022

Hey, I tried the steps you mentioned with the same version of Dev Tools and it works for me (image attached) on Chrome (Version 100.0.4896.127 (Official Build) (64-bit)), could you also mention the browser and its version along with your operating system and version.

image

@eps1lon
Copy link
Collaborator Author

eps1lon commented Apr 24, 2022

I linked the wrong codesandbox. Let me update it. If you wrap ValueReader in forwardRef you should be able to reproduce

@eps1lon
Copy link
Collaborator Author

eps1lon commented Apr 24, 2022

@JayKaku Updated codesandbox. https://lpdk4t.csb.app/ should reproduce

@lunaruan lunaruan removed the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label May 3, 2022
@lunaruan lunaruan self-assigned this May 3, 2022
lunaruan added a commit that referenced this issue May 4, 2022
Resolves #24428

---

For fiber types that render user code, we check the PerformedWork flag rather than the props, ref, and state to see if the fiber rendered (rather than bailing out/etc.) so we know whether we need to do things like record profile durations. ForwardRef wasn't added to this list, which caused #24428.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants