Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

337
Vistas
I am trying to created a nested for a child component

i am trying to something like this:

 <Route path="/cam/cold/general" element={<General />} /> 
        <Route path='/cam/cold/general/substore' element={<jam />} >
          <Route path=':index' >
            <Route path='/order' element={<jam />} />
          </Route>
   </Route>

each child is meant to have sub sections

but i keep getting this error

router.ts:5 Uncaught Error: Absolute route path "/order" nested under path "/cam/cold/general/substore/:index" is not valid. An absolute child route path must start with the combined path of all its parent routes.
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Issue

Uncaught Error: Absolute route path "/order" nested under path "/cam/cold/general/substore/:index" is not valid. An absolute child route path must start with the combined path of all its parent routes.

The error is informing you that the absolute path "/order" can't be nested under "/cam/cold/general/substore". When nesting routes you should use relative routes. The difference between absolute and relative paths is the leading "/" character. Absolute paths start with a "/".

Solution

Remove the leading "/" from the nested "order" route.

<Route path="/cam/cold/general" element={<General />} /> 
<Route path='/cam/cold/general/substore' element={<Jam />} >
  <Route path=':index'>
    <Route path='order' element={<Jam />} />
  </Route>
</Route>

If you've no other nested routes I suggest to flatten the nesting a bit.

<Route path="/cam/cold/general" element={<General />} /> 
<Route path='/cam/cold/general/substore'>
  <Route index element={<Jam />} />
  <Route path=':index/order' element={<Jam />} />
</Route>
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda