React-sidenav: TypeError: Cannot read property 'children' of undefined

React-sidenav: TypeError: Cannot read property 'children' of undefined

当我想从 react-sidenav 显示我的导航时,我得到了这个错误: 错误堆栈跟踪:https://hastebin.com/isiguweces.php

我的 class Navig.js 其中包含我的导航:https://hastebin.com/kanotegido.xml

还有我的 App.js 它的用途:https://hastebin.com/xiyikatice.scala

问题是 props$iconundefined(命名为 user 而不是 userCircle)。

改变

import { user } from 'react-icons-kit/fa/userCircle';

import { userCircle } from 'react-icons-kit/fa/userCircle';

解决您的问题。