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

196
Views
Overwriting values in input fields in React after being passed via props

I seem to be confusing myself, I am passing props into another component so I can populate form data. Think of opening a form so I can edit a contact.

This is one of the fields

                <input
                  type="text"
                  value={props.firstname}
                  placeholder={props.firstname}
                  onChange={(e) => setFirstName(e.target.value)}
                  className="w-full border-b px-4 py-2"
                />

When the form opens the value is of course the props.firstname but I am unable to over write it. Is this because a value can only be sent and not over written?

I am trying to have component populated with a contacts information, but then have the values editted to be sent to another end point to update said contact.

Am i missing something? This the last bit of my app i need to finish

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