我可以访问(this.)props.somePropValue
并查看其子内容,但在访问(this.)props.somePropValue.subContents
时,会返回UNDEFINED
(this.)props.somePropValue = {
id: 012345,
subArray: []
}
const SomeComponent = (props) => {
// somePropValue defined here & subArray IS VISIBLE inside somePropValue
console.log(props.somePropValue)
// subArray UNDEFINED here
console.log(props.somePropValue.subArray)
return (
<div />
)
}