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

161
Vistas
Nested route with parameter not wokring as expected

In my React js Typescript project, I have tried to create a nested route like this.

Dashboard.tsx

   <Route path={`${path}/production-schedule`} >
       <Route render={() =><ProductionSchedule />} />
   </Route>

ProductionSchedule.tsx

   <Route path={"/:date"} render={() =><ProductionScheduleSingleDateView />} />
        <Paper
        square
        sx={{
          p: 2,
          display: 'flex',
          flexDirection: 'column',
          height: 106,
          padding: '16px 0px 18px 24px',
        }}
      >
            {/* Header section */}
            <HeaderStepper title="Production Schedule" steps={ [{ link: '/', name: "Main Page"}, {link: '/dashboard/production-schedule', name: "Production Schedule"} ]} />
        <Typography component="h2" variant="h6" style={{ marginTop: '22px' }}>
          Production schedule
        </Typography>

How can I make this route only match this if there is a path param, and not the entire route.

about 4 years ago · Juan Pablo Isaza
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