Use nested (Memory)Router in 'nested' react application

preview_player
Показать описание

Below, you can find the text related to the question/problem. In the video, the question will be presented first, followed by the answers. If the video moves too fast, feel free to pause and review the answers. If you need more detailed information, you can find the necessary sources and links at the bottom of this description. I hope this video has been helpful, and even if it doesn't directly solve your problem, it will guide you to the source of the solution. I'd appreciate it if you like the video and subscribe to my channel!Use nested (Memory)Router in "nested" react application

My organization has a frontend application which has a plugin interface. This can be used to integrate “nested” React applications into the frontend. I wanted to accommodate additional subpages in my plugin and used the MemoryRouter from React-Router for this.
Runing my Plugin localy works fine but combined with the "parent" application I get the error message:
MemoryRouter
"You cannot render a Router inside another Router . You should never have more than one in your app."

"You cannot render a Router inside another Router . You should never have more than one in your app."

Obviously my approach is not desirable/an antipattern, but I am wondering how I can “simulate” the behavior of a nested router, or what would be a better approach here?

Tags: reactjs,typescript,react-routerSource of the question:

Question and source license information:
Рекомендации по теме
join shbcf.ru