Skip to content

Commit 08a5fda

Browse files
committed
Support Use
1 parent 88ccaec commit 08a5fda

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/react-debug-tools/src/ReactDebugHooks.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ function use<T>(usable: Usable<T>): T {
196196
case 'fulfilled': {
197197
const fulfilledValue: T = thenable.value;
198198
hookLog.push({
199-
displayName: null,
199+
displayName: 'Use',
200200
primitive: 'Promise',
201201
stackError: new Error(),
202202
value: fulfilledValue,
@@ -214,7 +214,7 @@ function use<T>(usable: Usable<T>): T {
214214
// If this was an uncached Promise we have to abandon this attempt
215215
// but we can still emit anything up until this point.
216216
hookLog.push({
217-
displayName: null,
217+
displayName: 'Use',
218218
primitive: 'Unresolved',
219219
stackError: new Error(),
220220
value: thenable,

packages/react-debug-tools/src/__tests__/ReactHooksInspection-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ describe('ReactHooksInspection', () => {
551551
},
552552
"id": null,
553553
"isStateEditable": false,
554-
"name": "Promise",
554+
"name": "Use",
555555
"subHooks": [],
556556
"value": "world",
557557
},
@@ -596,7 +596,7 @@ describe('ReactHooksInspection', () => {
596596
},
597597
"id": null,
598598
"isStateEditable": false,
599-
"name": "Unresolved",
599+
"name": "Use",
600600
"subHooks": [],
601601
"value": Promise {},
602602
},

0 commit comments

Comments
 (0)