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

109
Vistas
Submit button not giving required result

My submit button is not displaying output when i am pressing it but when i do a backspace it is giving me the output on the screen. enter image description here

about 4 years ago · Santiago Gelvez
1 Respuestas
Responde la pregunta

0

Post code instead of posting images

According to the image that you have provided, inside saveTask you are pushing the obj to the taskList and then passing it to the state updating function. Arrays are of reference type and since here you are not passing a new array, react will figure out that the array hasn't changed (although you have appended the obj) and hence it won't trigger a re-render.

So change your code to this,

const saveTask = (taskObj) => {
      setTaskList(prevList => {
           prevList.push(taskObj) 
           return [...prevList]      
      })
}
about 4 years ago · Santiago Gelvez Denunciar
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