Breadcrumbs prop is never updated
See original GitHub issuegetBreadcrumbs
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:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top 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 >
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
Hi @icd2k3 , Thank you so much for taking care of testing. Answers:
I have tried to use
withRouter
in combination withwithBreadcrumb
, in various order and with different configurations. I have even made the attempt to decorate it with reduxconnect
, 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.@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.