Skip to content
This repository has been archived by the owner on Jun 3, 2020. It is now read-only.

Failed prop type: The prop children is marked as required in Sidebar #194

Open
MohammedAlasaad opened this issue Oct 25, 2019 · 1 comment

Comments

@MohammedAlasaad
Copy link

Hi,
I am getting this error. Should we add something for children? I dont see that u use it in the example.

Warning: Failed prop type: The prop childrenis marked as required inSidebar, but its value is undefined. in Sidebar (created by Header) in Header (created by App) in div (created by App) in App (created by Route) in Route in ScrollToTop (created by Route) in Route (created by withRouter(ScrollToTop)) in withRouter(ScrollToTop) in Router (created by BrowserRouter) in BrowserRouter

@chriscarrillo
Copy link

chriscarrillo commented Feb 7, 2020

It looks like Sidenav cannot be self-closing. It is required to have children. A temporary workaround is to put an empty fragment inside the component.

<Sidenav>
    <></>
</Sidenav>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants