WIP Router V6 migration: update Link component
Created by: oleggromov
Intro
As part of the React Router V6 migration, we want to gradually update our codebase to stop using outdated APIs.
These include Router V5 internals and direct use of history
, so that later we can remove these dependencies.
The approach we're taking roughly follows the official V5 → V6 migration guide.
This PR description
This PR does two things.
- Wraps all Routes in
CompatRoute
as suggested in the migration guide. This allows us to use both old and new APIs simultaneously - and therefore migrate incrementally. - Updates the
AnchorLink
component, which is one of the most fundamental to the app navigation and the deepest leaf in the component tree.
Test plan
- Check out the branch
- Check carefully that links in the app work (TBD)
App preview:
Check out the client app preview documentation to learn more.