nutgaard / react-router-breadcrumbs

Breadcrumb component for react-router
Other
46 stars 11 forks source link

Duplicated key #245

Closed manodupont closed 7 years ago

manodupont commented 7 years ago

I always have the duplicated key warning

Warning: flattenChildren(...): Encountered two children with the same key, `Home`. Child keys must be unique; when two children share a key, only the first child will be used.
    in div (created by Breadcrumbs)

can you do something to it ?

nutgaard commented 7 years ago

Hi, @manodupont and thanks for posting your issue.

This is most likely due to something in your routeconfig. If you post it here, then I can take a look at it, and perhaps figure out whats going on.

By default the breadcrumbs component uses a combination of the crumbs text and href to generate a key ( https://github.com/nutgaard/react-router-breadcrumbs/blob/master/src/breadcrumbs.js#L43 ).

Are you using a your own createLink or in other ways customizing the component?

nutgaard commented 7 years ago

No response, and I'm not able to reproduce this without more information.