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

173
Views
problems with rendering in react using input number

I'm using react, I'm creating an ecommerce, when I choose how many products I want to add to my cart, everything works fine, but when I navigate to another product, the last quantity added in the input number is not updated, for example, if I add 4 to a product and I pass to another product the value in that remains at 4 instead of being 1

this is my code

 (<Link to={"/cart"} className="btn btn-success text-light"> <button className="btn btn-success text-light mt-2">Terminar Compra 💸</button> </Link>) 
: (<input onClick={count} type={"number"} min={"1"} max={Stock} defaultValue="1" ></input>)}
      </div>

product 1 product 2

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!