Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

174
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda