Example code key in map is undefined
Closed this issue · 1 comments
DalderupMaurice commented
In the sample code
<div>
{breadcrumbs.map((breadcrumb, index) => (
<span key={breadcrumb.props.key}>
<NavLink to={breadcrumb.props.match.url}>
{breadcrumb}
</NavLink>
{(index < breadcrumbs.length - 1) && <i> / </i>}
</span>
))}
</div>
<span key={breadcrumb.props.key}>
should be replaced with <span key={breadcrumb.key}>
as breadcrumb.props does not contain a key in props
icd2k3 commented
Thanks for reporting this! Updated the readme