Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从ReactJS中的this.props.children获取高度_Reactjs - Fatal编程技术网

从ReactJS中的this.props.children获取高度

从ReactJS中的this.props.children获取高度,reactjs,Reactjs,如何从儿童身上获得身高,作为道具传递?我的意思是: {this.props.children}//长得高吗? 已解决: this.childElement.offsetHeight//提供高度 (this.childElement=node)}>{children}

如何从儿童身上获得身高,作为道具传递?我的意思是:


{this.props.children}//长得高吗?
已解决:

this.childElement.offsetHeight//提供高度
(this.childElement=node)}>{children}