Skip to content

Commit

Permalink
Add a note about non-DOM contexts
Browse files Browse the repository at this point in the history
  • Loading branch information
timdorr authored Nov 24, 2024
1 parent 94d4351 commit 4688dcf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/upgrading/v6.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,13 @@ find ./path/to/src \( -name "*.tsx" -o -name "*.ts" -o -name "*.js" -o -name "*.
+import { RouterProvider } from "react-router/dom";
```

Note you should use a top-level import for non-DOM contexts, such as Jest tests:

```diff
-import { RouterProvider } from "react-router-dom";
+import { RouterProvider } from "react-router";
```

Congratulations, you're now on v7!

[react-flushsync]: https://react.dev/reference/react-dom/flushSync

0 comments on commit 4688dcf

Please sign in to comment.