@@ -41,10 +41,18 @@ type ClassComponentStackNode = {
41
41
owner ?: null | ReactComponentInfo | ComponentStackNode , // DEV only
42
42
stack ?: null | string | Error , // DEV only
43
43
} ;
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
+ }
44
51
export type ComponentStackNode =
45
52
| BuiltInComponentStackNode
46
53
| FunctionComponentStackNode
47
- | ClassComponentStackNode ;
54
+ | ClassComponentStackNode
55
+ | ServerComponentStackNode ;
48
56
49
57
export function getStackByComponentStackNode (
50
58
componentStack : ComponentStackNode ,
@@ -63,6 +71,9 @@ export function getStackByComponentStackNode(
63
71
case 2 :
64
72
info += describeClassComponentFrame ( node . type ) ;
65
73
break ;
74
+ case 3 :
75
+ info += describeBuiltInComponentFrame ( node . type ) ;
76
+ break ;
66
77
}
67
78
// $FlowFixMe[incompatible-type] we bail out when we get a null
68
79
node = node . parent ;
@@ -110,6 +121,11 @@ export function getOwnerStackByComponentStackNodeInDev(
110
121
) ;
111
122
}
112
123
break ;
124
+ case 3 :
125
+ if ( ! componentStack . owner ) {
126
+ info += describeBuiltInComponentFrame ( componentStack . type ) ;
127
+ }
128
+ break ;
113
129
}
114
130
115
131
let owner : void | null | ComponentStackNode | ReactComponentInfo =
0 commit comments