#Migrating to react-router spa with multiple react root

1 messages · Page 1 of 1 (latest)

cerulean spade
#

Hello,
I am slowly migrating to use RR as a library.
At the moment we have have a mix of static markup with some pieces or React render as different root.
I cannot wrap them all under one single BrowserRouter; when I click on a Link under one root, the other root are not aware of the navigation.

What would be good stragegy to make it work?

cerulean spade
#

I ended up putting all the react root under a unique one and portalling them back to their initial root container.
A bit ugly but worked

pallid hull
#

If you used createBrowserRouter you would have a single router instance