Are nested CompatRoutes supported? #9509
Unanswered
savolkov
asked this question in
v5 to v6 Migration
Replies: 2 comments 1 reply
-
Beta Was this translation helpful? Give feedback.
0 replies
-
I think I see two problems: First, your compat route won't match deeply without a splat (Step 5 in the guide). So change them to this: <Router history={History}>
<CompatRouter>
<Switch>
- <CompatRoute path="/framed">
+ <CompatRoute path="/framed/*">
<FramedApp>{appRoutes}</FramedApp>
</CompatRoute>
- <CompatRoute path="/">
+ <CompatRoute path="*">
<App>{appRoutes}</App>
</CompatRoute>
</Switch>
</CompatRouter>
</Router> Second, you've got absolute URLs on the |
Beta Was this translation helpful? Give feedback.
1 reply
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey, currently we have the following v5 structure:
where
appRoutes
are the following array (shortened):I'm trying to apply the migration package the following way:
having
appRoutes
as following:And it shows just blank screen.
Simplifying whole router to a structure like this:
also leads to blank screen on the specified route.
So, it seems to me that either the compatibility package does not support nested routes or I'm doing something wrong.
Could you please help me to understand what's going on?
Beta Was this translation helpful? Give feedback.
All reactions