There is a navigation and search component in a separate npm package. These components are imported into the project in which react-router-dom is installed. I would like to use a component from react-router-dom called Link in the navigation component, as well as useLocation hooks, etc. At the moment, I have to pass all the necessary parameters from the components to the project and route it already in the project.
The components require a BrowserRouter to work, it would be a bad way to put a BrowserRouter in each component, since they start multiplying and, moreover, do not pass the necessary data to the main BrowserRouter located in the project itself.
p.s. The components are in a separate NPM project. These components need to be inserted into another project.