MemoryRouters inside of a BrowserRouter, v6 #10114
Unanswered
jamesmarrs
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have universal components that are built on top of the
react-router
API like modals, tabs, etc that are used extensively with nested routes. I really want to reuse these components in a lesser, non browser router context, to organize and maintain my most complicated and independent components within the project. I am trying to use a memory router inside a browser router for this reason. I think it would be useful to apply thereact-router
paradigm to these components using aMemoryRouter
. This would give me the ability to use components that have already been built on this API that work extremely well, and to not re-invent the wheel whenreact-router
excels at this functionality.After doing a bit of research on the issue, a solution that works with the current API, following @ryanflorence suggestion from #9112 (comment)
I navigate the original tree by importing the
BrowserRouter
export directly:router.navigate()
This solution comes with its issues:
render()
is called.Shipping a solution like this isn't an option for me, so i was interested to see if there has been any traction on this issue since @timdorr commented on a simplified version of a proposal from: #9601 (comment)
If there is currently someone working on this, could I be pointed in the right direction to collaborate or help with this?
Thanks for all the work on this library!
Beta Was this translation helpful? Give feedback.
All reactions