Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
icd2k3 authored Mar 31, 2020
1 parent acc1dca commit 494fe2c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,19 @@ const DynamicUserBreadcrumb = ({ match }) => (
<span>{userNamesById[match.params.userId]}</span>
);

// 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 }) => (
<div>
{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
}) => (
<span key={match.url}>
<NavLink to={match.url}>{breadcrumb}</NavLink>
Expand Down

0 comments on commit 494fe2c

Please sign in to comment.