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

168
Views
runtime.js:7 Uncaught Error: [RequireAuth] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>
**react route****I wanted to make a route that's secure but it's not working.**
  <Routes>
    <Route path='/' element={<Home></Home>}></Route>
    <Route path='/home' element={<Home></Home>}></Route>
    <Route path='/register' element={<Register></Register>}></Route>
    <Route path='/login' element={<Login></Login>}></Route>

    <RequireAuth>
      <Route path='/manageproducts' element={<ManageProduct></ManageProduct>}></Route>
    </RequireAuth>
  </Routes>
</div>

Here i implemented require auth but it's not working

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The RequireAuth component needs to be wrapped within a Route as follows:

<Route
    path="/manageproducts"
    element={
        <RequireAuth>
            <ManageProduct/>
        </RequireAuth>
    }
/>;

This would give Routes a child of Route and resolve the error you are getting

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