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.

Breadcrumbs prop is never updated

See original GitHub issue

getBreadcrumbs is never fired again after first rendering. Current usage:

const routes = […]

class Breadcrumbs extends Component {
    componentWillReceiveProps({breadcrumbs}) {
        // never reached
        console.log(breadcrumbs);
    }

    render() {…}
}

export default withBreadcrumbs(routes)(Breadcrumbs);

Setup:

  • react@15.6.2
  • react-router@4.2.0
  • react-router-dom@4.2.2
  • react-router-breadcrumbs-hoc@1.1.1

Need more details or a playground link?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
LostCrewcommented, Jan 29, 2018

Hi @icd2k3 , Thank you so much for taking care of testing. Answers:

  • Sadly, at this moment, we’re locked with 15 due to work needed to upgrade other libraries
  • None, otherwise I would have reported them here
  • Excellent assumption: I will verify that and get back to you soon

I have tried to use withRouter in combination with withBreadcrumb, in various order and with different configurations. I have even made the attempt to decorate it with redux connect, in hope that that would feed in new props from store upon location change, thus somehow driving the component to re-render. In the end, nothing worked. Anyways, expect updates with results of my investigations.

0reactions
LostCrewcommented, Mar 26, 2018

@icd2k3 Good like that, unfortunately we paused the upgrade of react router that involves switching to this new breadcrumbs component until further requirements are provided. Still, I wish someone else would encounter this and be up to move discussion forward.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problems with unique key prop with "useBreadcrumbs from ...
I'm having problems understanding how to apply key attribute for my breadcrumbs router component. I am getting this error ...
Read more >
React.js BluePrint Breadcrumbs Components Props
React.js BluePrint Breadcrumbs Components Props ; breadcrumbRenderer: It is a callback function that is triggered to render visible breadcrumbs.
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 >
Breadcrumb - Chakra UI
Breadcrumbs is a navigation pattern that helps users understand the hierarchy of a website.
Read more >
How to Create Breadcrumbs in React.js - MakeUseOf
It is important to note that breadcrumbs should not be used as the ... For that, you can use the className prop of...
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