With my current router, the Root
component renders fine at "/"
but the Blog
component does not show up:
const router = createBrowserRouter(
createRoutesFromElements(
<Route path='/*' element={<Root />}>
<Route path='/' element={<Blog />} />
<Route path='code' element={<Code />} />
</Route>
)
);
I have tried removing the "*"
, but that seems to do nothing. Is there a way to get a conditional route nested within a 'universal' route using createBrowserRouter
?