-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correctly destructure component in withBreadcrumbs.js #59
Comments
Hey @jzucadi, out of curiosity, what is the console warning you're seeing? Thanks! |
Thanks for making a great HOC! My error is as follow: |
Thank you for reporting! I did some testing and I'm seeing this warning as well... flagging this as a bug and I will look into a fix in the near future. |
You should no longer see this component warning in version However, this did highlight a more interesting issue that will need a bit of a refactor. I've detailed it in the PR notes and will start thinking about a more permanent solution to this kind of problem. |
Thank you, that was such a fast turn around. Very much appreciated, I thought there was something on my end with my middleware. Do you have a patreon or one of those? |
Hey, no worries! I don't have a patreon, just happy to help. Your report also helped me identify a deeper design issue I'd like to fix soon, so this was valuable to me as well. Let me know if you run into something else, cheers! 🍻 |
Within the file: withBreadcrumbs.js, I am trying to destructure the follow section:
const render = ({ breadcrumb, match, location, ...rest }) => { const componentProps = { match, location, key: match.url, ...rest }; if (typeof breadcrumb === 'function') { return createElement(breadcrumb, componentProps); } return createElement('span', componentProps, breadcrumb); };
My problem is that this component gets lumped into
rest
and then outputted into thespan
where it throws a console warning (due to some other internal workings in my app that don't have anything to do with breadcrumbs). Any insight is appreciatedThe text was updated successfully, but these errors were encountered: