Skip to content

Commit 57d5639

Browse files
committed
stash
1 parent 4a3b5eb commit 57d5639

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

packages/react-server/src/ReactFizzComponentStack.js

+17-1
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,18 @@ type ClassComponentStackNode = {
4141
owner?: null | ReactComponentInfo | ComponentStackNode, // DEV only
4242
stack?: null | string | Error, // DEV only
4343
};
44+
type ServerComponentStackNode = { // DEV only
45+
tag: 3,
46+
parent: null | ComponentStackNode,
47+
type: string, // name + env
48+
owner?: null | ReactComponentInfo | ComponentStackNode, // DEV only
49+
stack?: null | string | Error, // DEV only
50+
}
4451
export type ComponentStackNode =
4552
| BuiltInComponentStackNode
4653
| FunctionComponentStackNode
47-
| ClassComponentStackNode;
54+
| ClassComponentStackNode
55+
| ServerComponentStackNode;
4856

4957
export function getStackByComponentStackNode(
5058
componentStack: ComponentStackNode,
@@ -63,6 +71,9 @@ export function getStackByComponentStackNode(
6371
case 2:
6472
info += describeClassComponentFrame(node.type);
6573
break;
74+
case 3:
75+
info += describeBuiltInComponentFrame(node.type);
76+
break;
6677
}
6778
// $FlowFixMe[incompatible-type] we bail out when we get a null
6879
node = node.parent;
@@ -110,6 +121,11 @@ export function getOwnerStackByComponentStackNodeInDev(
110121
);
111122
}
112123
break;
124+
case 3:
125+
if (!componentStack.owner) {
126+
info += describeBuiltInComponentFrame(componentStack.type);
127+
}
128+
break;
113129
}
114130

115131
let owner: void | null | ComponentStackNode | ReactComponentInfo =

0 commit comments

Comments
 (0)