diff --git a/README.md b/README.md index dd30878..068868b 100644 --- a/README.md +++ b/README.md @@ -77,19 +77,19 @@ const DynamicUserBreadcrumb = ({ match }) => ( {userNamesById[match.params.userId]} ); +// define custom breadcrumbs for certain routes. +// breadcumbs can be components or strings. const routes = [ { path: '/users/:userId', breadcrumb: DynamicUserBreadcrumb }, { path: '/example', breadcrumb: 'Custom Example' }, ]; -// map & render your breadcrumb components however you want. +// map, render, and wrap your breadcrumb components however you want. const Breadcrumbs = ({ breadcrumbs }) => (
{breadcrumbs.map(({ match, breadcrumb - // other props are available during render, such as `location` - // and any props found in your route objects will be passed through too }) => ( {breadcrumb}