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

220
Views
In React functional components, should we prefer using useCallback or should we make functions pure and keep outside the component?

If function is kept inside the component it will get re-initialised on every render which can be prevented with useCallback but that itself has some cost. Should we keep functions outside the component and pass props, state, state updater functions or whatever is required as arguments?

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

0

Yes, because this way it will be more convenient to manage the function, you build it only once and pass dynamic values ​​to it. If you define it in every component of your code you will write the same function several times, which is not effective at all

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!