Uploaded image for project: 'OpenShift Console'
  1. OpenShift Console
  2. CONSOLE-3661

Migrate all react-router v5 API usage to v6

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Critical Critical
    • None
    • None
    • Dynamic Plugins
    • None

      One of the requirements for adopting OpenShift Dynamic Plugin SDK (which is the new version of HAC Core SDK) is to bump the version of react-router to version 6.

      Once we have the `react-router-dom-v5-compat` package installed in console repository we need to update all the necessary components based on https://reactrouter.com/en/main/upgrading/v5

       

      AC: Update all the react-router v5 components into using react v6. Those should be 

      • Upgrade all <Switch> components to <Routes>
      • Update relative Routes and Links
      • Use `useNavigate` instead of `useHistory`
      • Update <Link> component usage
      • Update <NavLink> component usage
      • Replace `useRouteMatch` with `useMatch`

            Unassigned Unassigned
            jhadvig@redhat.com Jakub Hadvig
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: