1 | # React Router
|
2 |
|
3 | The `react-router` package is the heart of [React Router](https://github.com/remix-run/react-router) and provides all
|
4 | the core functionality for both
|
5 | [`react-router-dom`](https://github.com/remix-run/react-router/tree/main/packages/react-router-dom)
|
6 | and
|
7 | [`react-router-native`](https://github.com/remix-run/react-router/tree/main/packages/react-router-native).
|
8 |
|
9 | If you're using React Router, you should never `import` anything directly from
|
10 | the `react-router` package, but you should have everything you need in either
|
11 | `react-router-dom` or `react-router-native`. Both of those packages re-export
|
12 | everything from `react-router`.
|
13 |
|
14 | If you'd like to extend React Router and you know what you're doing, you should
|
15 | add `react-router` **as a peer dependency, not a regular dependency** in your
|
16 | package.
|