In version 5 I could perform check this way https://v5.reactrouter.com/web/api/matchPath
import { matchPath } from "react-router";
const match = matchPath("/users/123", {
path: "/users/:id",
exact: true,
strict: false
});
In version 6 I get an error on the screen. How should this work now? error: pathname.match is not a function