question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

breadcrumb prop is being ignored.

See original GitHub issue

My 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:closed
  • Created 5 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
icd2k3commented, Sep 13, 2018

Ohh, I could do a better job of calling that out in the readme… added a small change here.

Thanks @pimmey!

1reaction
pimmeycommented, Sep 13, 2018

@icd2k3 I see why it didn’t work now - it wasn’t clear to me that routesConfig has to be passed to withBreadcrumbs() 🙂thought it should happen automatically or something. Anyway, this should do it, works fine.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found