You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stacked on #30142.
This tracks owners and their stacks in DEV in Fizz. We use the
ComponentStackNode as the data structure to track this information -
effectively like ReactComponentInfo (Server) or Fiber (Client). They're
the instance.
I then port them same logic from ReactFiberComponentStack,
ReactFiberOwnerStack and ReactFiberCallUserSpace to Fizz equivalents.
This gets us both owner stacks from `captureOwnerStack()`, as well as
appended to console.errors logged by Fizz, while rendering and in
onError.
'A script element was rendered with %s. If script element has children it must be a single string. Consider using dangerouslySetInnerHTML or passing a plain string as children.%s',
6547
6549
'a number for children',
6548
-
componentStack(['script','body','html']),
6550
+
componentStack(
6551
+
gate(flags=>flags.enableOwnerStacks)
6552
+
? ['script','App']
6553
+
: ['script','body','html','App'],
6554
+
),
6549
6555
]);
6550
6556
expect(mockError.mock.calls[1]).toEqual([
6551
6557
'A script element was rendered with %s. If script element has children it must be a single string. Consider using dangerouslySetInnerHTML or passing a plain string as children.%s',
6552
6558
'an array for children',
6553
-
componentStack(['script','body','html']),
6559
+
componentStack(
6560
+
gate(flags=>flags.enableOwnerStacks)
6561
+
? ['script','App']
6562
+
: ['script','body','html','App'],
6563
+
),
6554
6564
]);
6555
6565
expect(mockError.mock.calls[2]).toEqual([
6556
6566
'A script element was rendered with %s. If script element has children it must be a single string. Consider using dangerouslySetInnerHTML or passing a plain string as children.%s',
0 commit comments