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

181
Vistas
How to increase or decrease a value by taking data from the input field using use State?

I have an input field. I have to take the data and set the data by adding the previous value. I want to try it with the useState function.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

const [data, setData] = useState(0) // it is initial value and first assignment

setData((lastValue) => lastValue+1) // and Here lastValue is 0 and by increase it change to 1, Once again and again Whenever you call setter of State

about 4 years ago · Juan Pablo Isaza 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