Skip to content

Commit

Permalink
Support Use
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Mar 13, 2024
1 parent 88ccaec commit 08a5fda
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/react-debug-tools/src/ReactDebugHooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ function use<T>(usable: Usable<T>): T {
case 'fulfilled': {
const fulfilledValue: T = thenable.value;
hookLog.push({
displayName: null,
displayName: 'Use',
primitive: 'Promise',
stackError: new Error(),
value: fulfilledValue,
Expand All @@ -214,7 +214,7 @@ function use<T>(usable: Usable<T>): T {
// If this was an uncached Promise we have to abandon this attempt
// but we can still emit anything up until this point.
hookLog.push({
displayName: null,
displayName: 'Use',
primitive: 'Unresolved',
stackError: new Error(),
value: thenable,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ describe('ReactHooksInspection', () => {
},
"id": null,
"isStateEditable": false,
"name": "Promise",
"name": "Use",
"subHooks": [],
"value": "world",
},
Expand Down Expand Up @@ -596,7 +596,7 @@ describe('ReactHooksInspection', () => {
},
"id": null,
"isStateEditable": false,
"name": "Unresolved",
"name": "Use",
"subHooks": [],
"value": Promise {},
},
Expand Down

0 comments on commit 08a5fda

Please sign in to comment.