Releases: icd2k3/use-react-router-breadcrumbs
Releases · icd2k3/use-react-router-breadcrumbs
2.0.0
- Adds a
props
option in route config for passing properties through to the breadcrumb components. Previously, we were passing through all additional props on the route object, by moving it to an explicitprops
option we can avoid property conflicts and have better types support.
This will not be a breaking change unless you are already including extra props in your route objects.
For example:
const routes = [{
path: '/path',
breadcrumb: ({ extraProp }) => <span>{extraProp}</span>,
props: { extraProp: 'extra' }, // optional extra pass-through props for breadcrumb components
}]
useBreadcrumbs(routes)