[DevTools] Display React.optimisticKey in key positions#501
Conversation
4c3bc45 to
4c18085
Compare
Greptile OverviewGreptile SummaryThis PR improves the consistency of how
Confidence Score: 3/5
Important Files Changed
|
Additional Comments (2)
Prompt To Fix With AIThis is a comment left during a code review.
Path: packages/react-devtools-shared/src/backend/fiber/renderer.js
Line: 8698:8698
Comment:
Inconsistent handling of `REACT_OPTIMISTIC_KEY` - should return `'React.optimisticKey'` instead of `null` to match other locations (lines 2613, 6189, 6207, 7134). This could cause path matching to fail when tracking components that use `React.optimisticKey`.
```suggestion
key: key === REACT_OPTIMISTIC_KEY ? 'React.optimisticKey' : key,
```
How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix With AIThis is a comment left during a code review.
Path: packages/react-devtools-shared/src/backend/fiber/renderer.js
Line: 8706:8710
Comment:
Inconsistent with other locations - this should return the string `'React.optimisticKey'` instead of `null` when the key matches the constant. Path matching may fail otherwise.
How can I resolve this? If you propose a fix, please make it concise. |
|
Upstream PR was closed or merged. Code is synced via branch mirror. |
Mirror of facebook/react#35760
Original author: eps1lon
Summary
Current display was inconsistent (omitted when inspecting while stringified as
Symbol(react.optimistic_key)in the tree).This displays it as
React.optimisticKeymirroring the export.How did you test this change?