single-spa / single-spa-react

Single-spa lifecycles helper for React applications
https://single-spa.js.org/docs/ecosystem-react.html
MIT License
226 stars 63 forks source link

Parcel Nested Routes problem #167

Closed vinimarcili closed 12 months ago

vinimarcili commented 1 year ago

Hello! I have some MF's in React, where I have a main with a menu/header structure. This principal has routings for several Parcel`s. But each parcel also has routes nested inside. And here lies the problem: I am not able to make the React Router from within the parcels accept each other's routes. Example: I am on Parcel A, I click on the menu that should take me to Parcel B, but I get a white screen because Router for Parcel A does not have the route for Parcel B. I understand that I cannot create multiple instances of the Router, but without these instances the internal routes render nothing. Is there a way to pass the main instance to the Parcels or make this work somehow?

MilanKovacic commented 12 months ago

Closing due to inactivity. Feel free to reopen the issue if the problem still occurs.