-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start adopting React Router v6 API using compatibility layer
React Router v6 contains a number of breaking changes, however they have provided a helpful compatibility layer which allows us to start adopting the new APIs while still using v5. This means we don't have to update everything in one go (which would also require updating to React 18). Change implemented so far: - use hooks from new API, `useHistory` replaced by `useNavigate` - no standalone `Route` components, must be inside a `Switch` - use `CompatRoute` to begin consuming the new APIs - implement replacement for `useRouteMatch` from v5 which is not available in the new API. This also allows us to clean up the `NamespacedRoute` and related `namespacedMatch` used for navigation when switching namespaces avoiding the need to explicitly pass the `allNamespacesPath` on each namespaced resource details page.
- Loading branch information
1 parent
d87019d
commit 9c354e9
Showing
59 changed files
with
625 additions
and
559 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.