GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Support inner component _debugOwner in memo by hanq08 · Pull Request #18659 · react/react Conversation
Contributor
SummaryAdd _debugOwner to inner component of memo. Test Planone test added. Not familiar with the react test tool. let me know if it's good thanks.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 51a00f0:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
No significant bundle size changes to report. Size changes (experimental) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
No significant bundle size changes to report. Size changes (stable) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| }, | ||
| ] | ||
| `; | ||
|
|
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This snapshot is out of date now. (Not your fault.) Rebasing on master would result in a snapshot delta of:
diff --git a/packages/react-devtools-shared/src/__tests__/__snapshots__/ownersListContext-test.js.snap b/packages/react-devtools-shared/src/__tests__/__snapshots__/ownersListContext-test.js.snap index 7ef006fda..9b7609788 100644 --- a/packages/react-devtools-shared/src/__tests__/__snapshots__/ownersListContext-test.js.snap +++ b/packages/react-devtools-shared/src/__tests__/__snapshots__/ownersListContext-test.js.snap @@ -88,13 +88,17 @@ Array [ }, Object { "displayName": "Anonymous", - "hocDisplayNames": null, + "hocDisplayNames": Array [ + "Memo", + ], "id": 3, "type": 8, }, Object { "displayName": "Anonymous", - "hocDisplayNames": null, + "hocDisplayNames": Array [ + "ForwardRef", + ], "id": 4, "type": 6, },
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| done(); | ||
| }); | ||
|
|
||
| it('should include all owners for a component wrapped in react memo ', async done => { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
nit:
| it('should include all owners for a component wrapped in react memo ', async done => { | |
| it('should include all owners for a component wrapped in react memo', async done => { |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| const InnerComponent = React.forwardRef((props, ref) => <div ref={ref} />); | ||
| const Memo = React.memo(InnerComponent); | ||
| const Grandparent = () => { | ||
| const ref = React.createRef(); | ||
| return <Memo ref={ref} />; | ||
| }; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
nit Let's use a named function so we don't see "Anonymous" in the tests?
| const InnerComponent = React.forwardRef((props, ref) => <div ref={ref} />); | |
| const Memo = React.memo(InnerComponent); | |
| const Grandparent = () => { | |
| const ref = React.createRef(); | |
| return <Memo ref={ref} />; | |
| }; | |
| const InnerComponent = (props, ref) => <div ref={ref} />; | |
| const ForwardRef = React.forwardRef(InnerComponent); | |
| const Memo = React.memo(ForwardRef); | |
| const Grandparent = () => { | |
| const ref = React.createRef(); | |
| return <Memo ref={ref} />; | |
| }; |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I removed my previous comment because it seems to have been in error. Digging in more. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Moving things over to #19556 since I can't push to the branch this is based off of. Will land there. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.