Use CompatRouter if there is no BrowserRouter? #10012
Unanswered
kcauto01
asked this question in
v5 to v6 Migration
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'm following the migration steps to go from v5 to v6 for my work's repo. In step 3) of the Setting Up stage, it instructs me to put CompatRouter below every instance BrowserRouter. Our codebase does not use BrowserRouter, so my original thought was not to implement CompatRouter.
As I'm getting errors in the next portion of the guide, I'm thinking maybe CompatRouter should wrap all Switch components regardless of the presence of BrowserRouter. Is this correct?
If I try wrapping every Switch in CompatRouter, I start to see console errors talking about memory leaks which is also concerning. Does anyone have any insight on this? Thank you!
Beta Was this translation helpful? Give feedback.
All reactions