use-react-router-breadcrumbs

tiny, flexible, hook for rendering route breadcrumbs with react-router v6

MIT License

Downloads
204.5K
Stars
256
Committers
9

Bot releases are visible (Hide)

use-react-router-breadcrumbs - 4.0.1 Latest Release

Published by icd2k3 about 2 years ago

  • Fixes a type mismatch with the latest version of react-router-dom (#71)
use-react-router-breadcrumbs - 4.0.0

Published by icd2k3 about 2 years ago

  • Migrates from a peer dependency on react-router to react-router-dom instead. (Fixes #59)

The original reason for requiring react-router is because it is compatible with both web and react-native, so this hook now (as of version 4.0.0) only supports web. If there is enough interest, we can spin up another hook specifically for react-native.

use-react-router-breadcrumbs - 3.2.1

Published by icd2k3 over 2 years ago

  • Exports a new Route that extends react-router's for Typescript convenience when using dynamic routes. (#46) (thanks @MichaelDimmitt)
use-react-router-breadcrumbs - 3.2.0

Published by icd2k3 over 2 years ago

  • Adds support for declarative (<Route \> component) routes #46 (thanks @MichaelDimmitt)
use-react-router-breadcrumbs - 3.1.0

Published by icd2k3 over 2 years ago

  • Adjusts the automatic breadcrumbs generator to replace - with . For example, a URL with "some-route" would now render a default breadcrumb of "Some route" instead of "Some-route" #42 (thanks @codytooker)
  • Adds an additional option defaultFormatter for users to provide their own function to generate default breadcrumbs (string) => string #42 (thanks @codytooker)
use-react-router-breadcrumbs - 3.0.2

Published by icd2k3 almost 3 years ago

  • feat: adds ability to add metadata to route object #39 (@arjandepooter)
use-react-router-breadcrumbs - 3.0.1

Published by icd2k3 almost 3 years ago

use-react-router-breadcrumbs - 3.0.0

Published by icd2k3 almost 3 years ago

  • Support for react-router 6. #31 (huge thanks to @Grapedge for the refactor)

Note

Version >=3 only supports react-router 6... if you are still using react-router 5 please continue to use v2.0.2

use-react-router-breadcrumbs - 2.0.2

Published by icd2k3 over 3 years ago

  • Fixes type definitions (#28)
use-react-router-breadcrumbs - 2.0.1

Published by icd2k3 over 3 years ago

  • Maintenance release: updates all dev dependencies, node target, and bundle size improvements
use-react-router-breadcrumbs - 2.0.0

Published by icd2k3 almost 4 years ago

  • Adds a props option in route config for passing properties through to the breadcrumb components. Previously, we were passing through all additional props on the route object, by moving it to an explicit props option we can avoid property conflicts and have better types support.

This will not be a breaking change unless you are already including extra props in your route objects.

For example:

const routes = [{
  path: '/path',
  breadcrumb: ({ extraProp }) => <span>{extraProp}</span>,
  props: { extraProp: 'extra' },  // optional extra pass-through props for breadcrumb components
}]

useBreadcrumbs(routes)
use-react-router-breadcrumbs - 1.0.5

Published by icd2k3 almost 4 years ago

  • Fixes a typing issue with allowing null for breadcrumb (#12)
use-react-router-breadcrumbs - 1.0.4

Published by icd2k3 over 4 years ago

  • Fixes typescript definitions (#7) (thanks @ksocha)
use-react-router-breadcrumbs - 1.0.3

Published by icd2k3 over 4 years ago

  • Fix: edge case for multiple slashes in a URL (for example: site.com/sandwiches//tuna)
use-react-router-breadcrumbs - 1.0.2

Published by icd2k3 over 4 years ago

  • Fixes typescript definitions (#3)
use-react-router-breadcrumbs - 1.0.1

Published by icd2k3 over 4 years ago

  • Removes react-router-dom as a peer dependency