0

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?

Drew Reese
  • 165,259
  • 14
  • 153
  • 181
zeroclaim
  • 57
  • 2
  • 7

0 Answers0