Skip to content

Conversation

@icd2k3
Copy link
Owner

@icd2k3 icd2k3 commented Feb 24, 2018

Resolves #21

This PR bumps the package up to 2.0 with some core changes:

1.) You no longer need to explicitly pass breadcrumb strings or components in. For example:
/one/two --> Home / One / Two (with no route config set)

2.) There is an api contract change when mapping over breadcrumbs. Instead of returning [{ breadcrumb, path, /* ... */ }] to the component using the HOC. We now just return a flat array of breadcrumbs with props included. This makes the rendering step a bit easier to read / use.

3.) There is a new options object with an optional excludePaths param to easily opt-out of generating breadcrumbs for certain paths

4.) withBreadcrumbs is now the default export

@coveralls
Copy link

coveralls commented Feb 24, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling af7d07c on sensible-defaults into e05cf3a on master.

@icd2k3 icd2k3 force-pushed the sensible-defaults branch 13 times, most recently from 78162f0 to 6ee8b8b Compare March 8, 2018 02:28
@icd2k3 icd2k3 changed the title Adds sensible defaults if breadcrumbs are not explicitly provided v2: sensible defaults, simpler api, & default export Mar 8, 2018
@icd2k3 icd2k3 force-pushed the sensible-defaults branch from 23af59a to af7d07c Compare March 8, 2018 02:58
@icd2k3 icd2k3 merged commit 098b032 into master Mar 8, 2018
@icd2k3 icd2k3 deleted the sensible-defaults branch March 8, 2018 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants