0
これは正しい使い方ですか? "this.props.children.props.children"?this.props.childrenがこのコンポーネントを返すのはなぜですか?
{ React.cloneElement(this.props.children.props.children, this.props) }
this.props.childrenはこのコンポーネントを示します。私が忘れたのは何ですか?
React.cloneElement(this.props.children、this.props:
はESLintは '子どもたちが' 小道具の検証に欠けているが、私は、私はこれを使用して私のために正常に動作します
myClass.protoType = {
children: React.PropTypes.element.isRequired
};
あなたが '{React.cloneElement(this.props.children.props.children、this.props)}'によって何をしようとしているのかを説明します。さもなければ、それは 'protoType'ではなく 'propTypes' –
@DamienLeroux Thxそれは私の間違いでした – Ortee