From 494fe2c8b3d7c39bb31f2048d8d94e1ce6a283ca Mon Sep 17 00:00:00 2001 From: Justin Schrader Date: Tue, 31 Mar 2020 14:56:00 -0700 Subject: [PATCH] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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}