breadcrumb prop is being ignored.
See original GitHub issueMy route looks like this:
{
path: '/careers/:id',
exact: true,
breadcrumb: 'test',
component: CareerDetail
},
My breadcrumb component:
<div className="breadcrumbs">
{breadcrumbs.map((breadcrumb, index) => (
<span
className="breadcrumbs__item"
key={`${breadcrumb.key}-${index}`}>
<NavLink to={breadcrumb.props.match.url}>{breadcrumb}</NavLink>
</span>
))}
</div>
The url I navigate to:
http://localhost:3000/careers/5b71927e3e07c3430900118c
What I expect to see in the props:
careers > test
What I see:
careers > 5b71927e3e07c3430900118c
Am I missing something?
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Breadcrumb react code not working, how can i fix it?
The error it's bringing back is that I'm mishandling the props.children.map, may any of you tell me why or how to fix it?...
Read more >Build dynamic breadcrumb routes and child routes with ...
The <Page /> -component is a simple helper component to render a page with a title, and the withOutlet prop is an indication...
Read more >icd2k3/react-router-breadcrumbs-hoc: tiny, flexible ... - GitHub
Disabling default generated breadcrumbs · Option 1: Disable all default breadcrumb generation by passing disableDefaults: true in the options object · Option 2: ......
Read more >Breadcrumb | Components - BootstrapVue
Breadcrumb items Items are rendered using :items prop. It can be an array of objects to provide link and active state. Links can...
Read more >How To Add Breadcrumb (BreadcrumbList) Markup
Discover how adding breadcrumb markup to your web pages can help users understand ... data (however, this isn't necessary to be eligible for...
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 Free
Top 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
Ohh, I could do a better job of calling that out in the readme… added a small change here.
Thanks @pimmey!
@icd2k3 I see why it didn’t work now - it wasn’t clear to me that
routesConfig
has to be passed towithBreadcrumbs()
🙂thought it should happen automatically or something. Anyway, this should do it, works fine.