Skip to content

Commit 706f837

Browse files
committed
Add a mention of upgrading history. Closes #8232
1 parent a08430e commit 706f837

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/upgrading/v5.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,14 @@ $ npm install react-router-dom@next
147147
$ npm install react-router-native@next
148148
```
149149

150+
> **Note:** If you also have `history` as a dependency in your `package.json`, you will also need to upgrade it to v5:
151+
>
152+
> ```bash
153+
> $ npm install history@5
154+
> ```
155+
>
156+
> However, we recommend you remove it as a direct dependency, as we now wrap most of its APIs with hooks for better support of React Suspense.
157+
150158
### Upgrade all `<Switch>` elements to `<Routes>`
151159
152160
React Router v6 introduces a `Routes` component that is kind of like `Switch`, but a lot more powerful. The main advantages of `Routes` over `Switch` are:

0 commit comments

Comments
 (0)