Switching from component
to element
in CompatRoute doesn't render component, doesn't error
#13310
Unanswered
sam-glass
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
-
I have a
<Switch>
block (nested inside another<Switch>
in another file, which is where I have my<CompatRouter>
component wrapped). In this inner<Switch>
, I've made all the<Route>
components<CompatRoute>
s.This works:
<CompatRoute path="/v3/dashboard/something/:somethingToken/" component={Dummy} />
This doesn't
<CompatRoute path="/v3/dashboard/something/:somethingToken/" element={<Dummy />} />
My understanding was that the point of the CompatRoute object was to support both v5 and v6 syntax. So shouldn't the
element
value work (or at least throw an error in the console, which it doesn't)?Beta Was this translation helpful? Give feedback.
All reactions