You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/upgrading/v5.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ order: 1
7
7
8
8
## Backwards Compatibility Package
9
9
10
-
Instead of upgrading and updating all of your code at once (which is incredibly difficult and prone to bugs), the backwards compatibility package enables you to upgrade one component, one hook, and one route at a time by running both v5 and v6 in parallel. Any code you haven't touched is still running the very same code it was before. Once all components are exclusively using the v6 APIs, your app no longer needs the compatibility package and is running on v6. The official guide can be found [here][upgrading].
10
+
Instead of upgrading and updating all of your code at once (which is incredibly difficult and prone to bugs), the backwards compatibility package enables you to upgrade one component, one hook, and one route at a time by running both v5 and v6 in parallel. Any code you haven't touched is still running the very same code it was before. Once all components are exclusively using the v6 APIs, your app no longer needs the compatibility package and is running on v6. The official guide can be found [here](https://github.com/remix-run/react-router/discussions/8753).
11
11
12
12
We recommend using the backwards compatibility package to upgrade apps that have more than a few routes. Otherwise, we hope this guide will help you do the upgrade all at once!
13
13
@@ -267,7 +267,9 @@ A few important things to notice about v6 in this example:
267
267
automatically detect the best route for the current URL. This prevents bugs
268
268
due to manually putting routes in the wrong order in a `<Switch>`
269
269
270
-
You may have also noticed that all `<Route children>` from the v5 app changed to `<Route element>` in v6. Assuming you followed the upgrade steps to v5.1, this should be as simple as moving your route element from the child position to a named `element` prop. <!-- (TODO: can we provide a codemod here?) -->
270
+
You may have also noticed that all `<Route children>` from the v5 app changed to `<Route element>` in v6. Assuming you followed the upgrade steps to v5.1, this should be as simple as moving your route element from the child position to a named `element` prop.
271
+
272
+
<!-- (TODO: can we provide a codemod here?) -->
271
273
272
274
### Advantages of `<Route element>`
273
275
@@ -885,7 +887,9 @@ This change was made both to follow more closely the convention established by t
885
887
-`useRouteMatch({ sensitive })` is now `useMatch({ caseSensitive })`
886
888
- It returns a match object with a different shape
887
889
888
-
To see the exact API of the new `useMatch` hook and its type declaration, check out our [API Reference][usematch]. <!-- TODO: Show examples for refactoring useRouteMatch -->
890
+
To see the exact API of the new `useMatch` hook and its type declaration, check out our [API Reference](../hooks/use-match).
891
+
892
+
<!-- TODO: Show examples for refactoring useRouteMatch -->
889
893
890
894
## `<Prompt>` is not currently supported
891
895
@@ -896,6 +900,3 @@ To see the exact API of the new `useMatch` hook and its type declaration, check
896
900
Despite our best attempts at being thorough, it's very likely that we missed something. If you follow this upgrade guide and find that to be the case, please let us know. We are happy to help you figure out what to do with your v5 code to be able to upgrade and take advantage of all of the cool stuff in v6.
0 commit comments