• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Pruebas Online
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

135
Vistas
how does the update signal one number for my code?
const handleAddToUpdate = (selecteInventory) => {
    let newCart = [];
    const exists = inventorys.find(inventory => inventory.quantity === selecteInventory.quantity);
    if (!exists) {
        selecteInventory.quantity = parseInt();
        newCart = [...inventorys, selecteInventory];
    }
    else {
        const rest = inventorys.filter(inventory => inventory.quantity !== selecteInventory.quantity);
        exists.quantity = exists.quantity + 1;
        newCart = [...rest, exists];
    }
    setInventorys(newCart);
    // addToDb(selecteInventory.id);
}

<button className='btn btn-primary' onClick={() => handleAddToUpdate(inventory.quantity)}>UPDATE</button>`
almost 3 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 Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda