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

320
Views
What is the equal code for OnChange on React Class Component , on React Function Component

what is the equal code for this on React Function Component without using defaultValue?

<input onChange((e)=>{this.setState({title : this.target.value})}) value={value} />
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I think this is what your asking:

import { useState } from "react";

function MyComponent({defaultValue}) {
  const [inputValue, setInputValue] = useState(defaultValue);
  return (
    <form>
      <input
        type="text"
        onChange={(e) => setInputValue(e.target.value)}
        value={inputValue}
      />
    </form>
  );
}
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!