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

86
Views
Route render function not returning or rendering any element

So I am pretty new to React.js and not able to render an element from the Route module. The console is returning that the leaf route at location does not have an element hence renders an empty page. Other Route tags which use "element" function work correctly, so does this one. This is a snippet from the App.js file

          <Route
        path="/"
        render={(props) => (
          <ContactList
            {...props}
            contacts={contacts}
            getContactId={removeContactHandler}
          />
        )}
      />

I have been following a youtube tutorial in hopes of learning React quickly. Now some of the functions used in this tutorial are deprecated currently. So is there a different function that I should be using instead of this? Appreciate any help

Edit: The render and component function both are replaced by element prop, i found this answer helpful

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

0

The React router docs has recently been updated! Meaning syntax has changed. Take a look at this answer here.

about 4 years ago · Juan Pablo Isaza Report

0

If anyone wants to know, from version 6 onwards render and component props is replaced by element prop that is passed as a literal instead of through an arrow function ()=>{}. This answer explains it a bit more clearly.

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!