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

152
Views
Matched leaf route at location "/" does not have an element. This means it will render an <Outlet /> with a null value, so resulting in an empty page

the return statement gives a warning and addTodo & todos dont load. Switch is not supported anymore so I've replaced it with Routes but don't know how handle that return part

Does anybody know how do I solve this issue?

return (

 <>
  <Router>
    <Header title="To Do List" />

    <Routes>
      <Route exact path= "/" render={() => {
        return (
          <>
            <AddTodo addTodo = {addTodo} />
            <Todos todos = {todos} onDelete={onDelete} />
          </>
        )
      }
    }>
      </Route>
      <Route exact path = "/about" element = {<About/>} />
    </Routes>
    <Footer />
  </Router>
</>
);

Click to view warnings screenshot

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!