mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
10 lines
282 B
JavaScript
10 lines
282 B
JavaScript
// To preserve the nullthrows behavior and reactive deps of this code,
|
|
// Forget needs to add `props.a` as a dependency (since `props.a.b` is
|
|
// a conditional dependency, i.e. gated behind control flow)
|
|
|
|
function Component(props) {
|
|
let x = [];
|
|
x.push(props.a?.b);
|
|
return x;
|
|
}
|