Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update to work with react-router v7 #326

Open
@mikeycoxon

Description

It a simple matter to make a version of this library with react router v7.

basically, its change the peer dependency from react-router-dom to react-router

and import that at the top of LinkContainer.js, as in:

import { useHref, useLocation, useMatch, useNavigate } from 'react-router';

everything else seems to work just fine. Two reasons why I didn't submit this as a PR were:

  1. didn't know if I had the privileges
  2. this would be a breaking change for anyone still reliant on react-routeer v6 (and therefore react-router-dom)

maybe publish a variant?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /