diff --git a/packages/react-reconciler/src/__tests__/ReactIncrementalTriangle-test.internal.js b/packages/react-reconciler/src/__tests__/ReactIncrementalTriangle-test.internal.js
index fd82638be869e..5d11fd65f2f0b 100644
--- a/packages/react-reconciler/src/__tests__/ReactIncrementalTriangle-test.internal.js
+++ b/packages/react-reconciler/src/__tests__/ReactIncrementalTriangle-test.internal.js
@@ -189,6 +189,7 @@ describe('ReactIncrementalTriangle', () => {
leafTriangles.push(this);
}
this.state = {isActive: false};
+ this.child = React.createRef(null);
}
activate() {
this.setState({isActive: true});
@@ -203,6 +204,14 @@ describe('ReactIncrementalTriangle', () => {
this.state.isActive !== nextState.isActive
);
}
+ componentDidUpdate() {
+ if (this.child.current !== null) {
+ const {prop: currentCounter} = JSON.parse(this.child.current.prop);
+ if (this.props.counter !== currentCounter) {
+ throw new Error('Incorrect props in lifecycle');
+ }
+ }
+ }
render() {
if (yieldAfterEachRender) {
ReactNoop.yield(this);
@@ -228,7 +237,7 @@ describe('ReactIncrementalTriangle', () => {
activeDepthProp,
activeDepthContext,
});
- return ;
+ return ;
}
return (