[DevTools] Update Fiber logic in backend renderer to match implementation in React #22527
Conversation
This change looks substantial. I trust that it fixes the is-mounted-logic for the latest React version, but I wonder if it will break any older versions (like the one we originally forked from).
Do we know which commit to ReactFiberTreeReflection broke our mirror function here? Can we do a regression check for earlier versions of React to make sure we don't break them with this change?
@bvaughn that makes sense, i'll look into it. I took a quick glance at the blame of |
|
@bvaughn, alright, looks like the implementation changed 2 years ago in this commit: 8d7c733#diff-d80a1a14b2c962c703749c53ad26571becc96aea7e21e6af0cfdbfa652dd80a4 The current DevTools implementation was added 3 years ago, here: b56bc1a (which matched this implementation of roughly 3 years ago as well: In terms of doing a regression check, the procedure would be to build a version of React from before 8d7c733 and verify that DevTools still works correctly against that one? |
|
Sounds right! |
|
as we discussed offline, tested older version of react against CodeSandbox using latest DevTools, seems to work corectly (i updated the test plan for the PR with details) |
|
Thanks for testing! |
Summary
There is an issue reported internally where every time a specific component is inspected, we get the following error in the backend:
Unable to find node on an unmounted component..It appears to be happening because we are incorrectly detecting the component to be unmounted. As specified in this comment, I noticed that our implementation wasn't actually matching the one in React, so I updated it, and that seemed to solve the issue.
How did you test this change?
The text was updated successfully, but these errors were encountered: