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

364
Views
React component is changing an uncontrolled input to be controlled error

please , how can i get over this error of component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component.

this prevent the input field from showing what i am typing.

 const [sellerName, setSellerName] = useState();
  const [storeName, setStoreName] = useState("");

...

 <form className="registerInputContainer customerEditInput">
          <div className="regInput passForm ">
            <span className="userEmail">Owner's Full name (Required)</span>
            <div className="passwordContainer editCusInputField">
              <input
                placeholder="your name"
              
                value={sellerName }
              
                onChange={(e) => setSellerName(e.target.value)}
                className="passwordInput regInputField"
              />
            </div>
          </div>
          <div className="regInput passForm ">
            <span className="userEmail">Store Name (required)</span>
            <div className="passwordContainer editCusInputField">
              <input
                placeholder=""
                required
                
                value={storeName || ""}
                onChange={(e) => setStoreName(e.target.value)}
                className="passwordInput regInputField"
              />
            </div>
          </div>
...
        </form>


i have tried some of the solution i saw on stackoverflow but they are not working . thanks you all

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!