Release notes
*Sourced from [react-router's releases](https://github.com/ReactTraining/react-router/releases).*
> ## v5.1.0
> ### [Changes](https://github.com/ReactTraining/react-router/compare/v5.0.1...v5.1.0)
>
> ### Features
>
> - Add `useParams`, `useLocation`, `useHistory`, and `useRouteMatch` hooks (d6224d6a)
> - Add support for `forwardRef` in `` (b5528ed6)
> - Add support for functions in `` and `` ([#5331](https://github-redirect.dependabot.com/ReactTraining/react-router/issues/5331), [#5368](https://github-redirect.dependabot.com/ReactTraining/react-router/issues/5368))
> - Add `` API ([#5437](https://github-redirect.dependabot.com/ReactTraining/react-router/issues/5437))
>
> ### Bugfixes
>
> - Don't render `` elements when the `` does not match (96656595)
>
> ## v5.0.1
> ### [Changes](https://github.com/ReactTraining/react-router/compare/v5.0.0...v5.0.1)
>
> ### Updates
>
> - Reduced component depth in withRouter() HOC. (10d78bb)
> - Changed misleading warning when withRouter is used outside a Router (10d78bb)
> - Reduced install size and bundle size by switching to mini-create-react-context (992af48)
>
> ### Bugfixes
>
> - Fixed display name for router context consumer and provider (6a99c93)
> - Fixed infinite loop caused by Redirect in some scenarios (017f692 and 2ce1d32)
> - Fixed license issue for react context polyfill (f9849c8, then 992af48)
> - Fixed Redirect throwing an exception in StaticRouter without context (3ccbd19)
> - Fixed regression in matchPath that caused an exception for empty paths (7bd1407)
> - Fixed page reload when an exception was thrown in Link onClick (82ce94c)
> - Fixed warning about createRef or useRef values in wrappedComponentRef when using withRouter() (56c829b)
> - Fixed withRouter() wrapped component inside NavLink not working properly (a38ef04)
> - Fixed CJS build - previously, incorrect exports were emitted (caa9950)
>
> Thanks to [@StringEpsilon](https://github.com/StringEpsilon) for [putting this list together](https://github-redirect.dependabot.com/ReactTraining/react-router/issues/6739#issue-442975900). Enjoy!
>
> ## v5.0.0
> #### Note: While this does have a major version bump, it is actually a minor release. We screwed up some of the dependency version selection in 4.3.1, which necessitated a major bump. See [this blog post](https://reacttraining.com/blog/react-router-v5/) for details.
>
> ### ⚠️ Upgrade Warning ⚠️
> Please ensure you have upgraded both `react-router` and `react-router-dom` (`react-router-native` for RN users) to the _exact same_ version. If different versions of those two packages are in your application, you will get errors when using `` and other `react-router-dom`-specific components. You can ensure you have the correct versions of both packages in your app using `npm ls react-router react-router-dom`.
>
> ## Breaking Changes
>
> * Since the old context API is no longer used, any access to the old context will fail. Use of the react router context is not supported, please use `withRouter()` or a `` instead.
> * Due to the new context API, mixing of imports will now result in an exception:
>
> ```jsx
> // Be careful, this won't work anymore!
> ... (truncated)
Commits
- [`0c058ad`](https://github.com/ReactTraining/react-router/commit/0c058adc5b56c6d9b409af5e4d8330c645fac00c) v5.1.0
- [`ce2fdc7`](https://github.com/ReactTraining/react-router/commit/ce2fdc794a6d358a7bf0d681680b7468c5b1855c) Update size snapshots
- [`01ac3d7`](https://github.com/ReactTraining/react-router/commit/01ac3d7b27bb7ecfc5cf53df66937909e1c33c07) Update build step to use yarn instead of npm
- [`8f49b02`](https://github.com/ReactTraining/react-router/commit/8f49b02014db0a0419b3f2b1a9be29aad1341c34) Remove docs on context.router
- [`51325d8`](https://github.com/ReactTraining/react-router/commit/51325d850c68b5106cf58fc360331b6b886bb9c1) Update export style
- [`3debcd4`](https://github.com/ReactTraining/react-router/commit/3debcd4566bf3ee4c77b60d28f708bfd9222958c) Add hooks to documentation website
- [`0721144`](https://github.com/ReactTraining/react-router/commit/07211446ddf54b22d0f329898047f9b9c6c62ef9) Update React to 16.8
- [`0f29d23`](https://github.com/ReactTraining/react-router/commit/0f29d23e50bf517994cc3c5266844014866845e1) Update import/export style
- [`443126b`](https://github.com/ReactTraining/react-router/commit/443126bae6969ad3130decfbd0228fe4809a5813) Remove react-router-dom shim from website
- [`c4a89e1`](https://github.com/ReactTraining/react-router/commit/c4a89e17d10aa0ba3ea55ad4586e5fde47405cf8) Use react-app ESLint config and fix a few issues
- Additional commits viewable in [compare view](https://github.com/ReactTraining/react-router/compare/v2.8.1...v5.1.0)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme
Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)
Finally, you can contact us by mentioning @dependabot.
Bumps react-router from 2.8.1 to 5.1.0.
Release notes
*Sourced from [react-router's releases](https://github.com/ReactTraining/react-router/releases).* > ## v5.1.0 > ### [Changes](https://github.com/ReactTraining/react-router/compare/v5.0.1...v5.1.0) > > ### Features > > - Add `useParams`, `useLocation`, `useHistory`, and `useRouteMatch` hooks (d6224d6a) > - Add support for `forwardRef` in `` (b5528ed6) > - Add support for functions in `` and `Commits
- [`0c058ad`](https://github.com/ReactTraining/react-router/commit/0c058adc5b56c6d9b409af5e4d8330c645fac00c) v5.1.0 - [`ce2fdc7`](https://github.com/ReactTraining/react-router/commit/ce2fdc794a6d358a7bf0d681680b7468c5b1855c) Update size snapshots - [`01ac3d7`](https://github.com/ReactTraining/react-router/commit/01ac3d7b27bb7ecfc5cf53df66937909e1c33c07) Update build step to use yarn instead of npm - [`8f49b02`](https://github.com/ReactTraining/react-router/commit/8f49b02014db0a0419b3f2b1a9be29aad1341c34) Remove docs on context.router - [`51325d8`](https://github.com/ReactTraining/react-router/commit/51325d850c68b5106cf58fc360331b6b886bb9c1) Update export style - [`3debcd4`](https://github.com/ReactTraining/react-router/commit/3debcd4566bf3ee4c77b60d28f708bfd9222958c) Add hooks to documentation website - [`0721144`](https://github.com/ReactTraining/react-router/commit/07211446ddf54b22d0f329898047f9b9c6c62ef9) Update React to 16.8 - [`0f29d23`](https://github.com/ReactTraining/react-router/commit/0f29d23e50bf517994cc3c5266844014866845e1) Update import/export style - [`443126b`](https://github.com/ReactTraining/react-router/commit/443126bae6969ad3130decfbd0228fe4809a5813) Remove react-router-dom shim from website - [`c4a89e1`](https://github.com/ReactTraining/react-router/commit/c4a89e17d10aa0ba3ea55ad4586e5fde47405cf8) Use react-app ESLint config and fix a few issues - Additional commits viewable in [compare view](https://github.com/ReactTraining/react-router/compare/v2.8.1...v5.1.0)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language - `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com): - Update frequency (including time of day and day of week) - Pull request limits (per update run and/or open at any time) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired) Finally, you can contact us by mentioning @dependabot.