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

138
Views
Does simply passing huge amount of props uses any resources?

I was wondering if simply passing a huge amount of props uses any resources if none of them are actually used.
For example

<MyComponent data={data_10kRecord}/> 

VS

<MyComponent data={data_SingleRecord}/>  

MyComponent will use only one of the records and it will use it like this:

data[id]  

So does the first component use more resources than the second component?

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Well actually the props system in react is actually just a syntactic sugar that is parsed by babel (or other jsx parser) For an html element that has a normal object named props. So when you pass the 10k records it will create the props object that holds all the records. So far I think the best practice is to pass only the required record instead of creating a a huge props object that will take a place in the memory.

See this and how the bigger your object is the more memory it'll take.

about 4 years ago · Santiago Trujillo 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!