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

147
Views
Does change in Props Data Change the state of components or will it render the change?

I am currently learning React js, and the differences between props and States are apparent.

But will the change in data passed in the prop cause the component to re-render or will it still be static with the data passed initially?

I still have reservations on props values changes, if it does cause a re-render of the component(not changing the data within the components)?

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

0

A change in props will cause a re-render.

If you do not want this you can use a state like this:

const Component = (props) => {
  const [firstRenderProps] = useState(props);

firstRenderProps will always have the same value after a re-render

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!