0
私は反応ルータのルート要素の子の参照にアクセスしようとしますが、動作しません。ルートリアクト要素の子の 'ref'を取得
<Route path={path} render={() => (
<Child ref={ (el => this.$child = el)} />
)} />
コンソールログ:"Warning: Stateless function components cannot be given refs. Attempts to access this ref will fail."
感謝を!問題は、私の子供が単純なクラスだけでなく、 "default withRouter(Child)"をエクスポートすることでした! –