Search code examples
reactjssidenav

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


I get that error when I want to display my nav from react-sidenav: Error stack-trace: https://hastebin.com/isiguweces.php

My class Navig.js whose contains my nav: https://hastebin.com/kanotegido.xml

And my App.js where it's use : https://hastebin.com/xiyikatice.scala


Solution

  • The problem is that the props$icon is undefined (named user instead of userCircle).

    Change

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

    to

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

    To fix your issue.