Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

157
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!