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

169
Views
How to change the default value from a text field in react?

I am not able to edit in the text field its shows only the default value ,how to initially its show the default values and the I have to edit the text field as my requirement

const[vari,setVari]=React.useState("SAM");
  return (
    <div>
    <input value={vari} onchange={(e)=>setVari(e.target.value)}/>
    </div>
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

It is probably due to the fact that you are spelling the event listener in the HTML way instead of the React way. Try onChange instead of onchange.

about 4 years ago · Juan Pablo Isaza Report

0

You need 'onChange' not 'onchange': https://stackblitz.com/edit/react-ehulbm

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!