Skip to content

WIP Router V6 migration: update Link component

Warren Gifford requested to merge og/react-router-migration-link into main

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.

  1. 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.
  2. 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

  1. Check out the branch
  2. Check carefully that links in the app work (TBD)

App preview:

Check out the client app preview documentation to learn more.

Merge request reports

Loading