v2: sensible defaults, simpler api, & default export #22
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
optionsobject with an optionalexcludePathsparam to easily opt-out of generating breadcrumbs for certain paths4.)
withBreadcrumbsis now the default export