Warning: `BreadcrumbItem` is required as the wrapper of children element
See original GitHub issueEnvironment(required)
- antd version: 2.6.3
- OS and its version: MacOS Sierra
- Browser and its version: Google Chrome
What did you do? Please provide steps to re-produce your problem.
Copy pasted following code into a react component:
import { Menu, Icon, Breadcrumb, Layout } from 'antd';
<Content style={{ padding: '0 50px' }}>
<Breadcrumb>
<Breadcrumb.Item>Home</Breadcrumb.Item>
<Breadcrumb.Item><a href="">Application Center</a></Breadcrumb.Item>
<Breadcrumb.Item><a href="">Application List</a></Breadcrumb.Item>
<Breadcrumb.Item>An Application</Breadcrumb.Item>
</Breadcrumb>
<div style={{ background: '#fff', padding: 24, minHeight: 280 }}>{ children }</div>
</Content>
What do you expected?
It would work fine as it is taken from official website
What happened?
It renders properly, but I see the following error in console
Warning:
BreadcrumbItem is required as the wrapper of children element
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Invariant Violation: Objects are not valid as a React child
I was having this error and it turned out to be that I was unintentionally including an Object in my JSX code that...
Read more >ra-navigation documentation | React-Admin Enterprise Edition
To expose the app location to all react-admin components, wrap the <Layout> ... It's the job of its children ( <BreadcrumbItem> elements) to...
Read more >Breadcrumbs - Fictoan
The Breadcrumbs uses a native nav and li elements. ... The entire markup is wrapped in the BreadcrumbsWrapper , with individual BreadcrumbItem children...
Read more >KendoReact Changelog - Telerik
wrap .k-tooltip element in .k-child-animation-container container ... grid in v5 requires buttons, but was not state in the package.json ...
Read more >Why to get "Router may have only one child element" warning
We, first import the required tags from the react-router-dom dependency. Note that it is written BrowserRouter as Router.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
How about this?
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.