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

80
Views
cómo actualizar estados después de buscar en reaccionar

hola estoy haciendo una funcion que puedo subir imagenes a un servidor

mi pregunta es que después de buscar, quiero establecer la obtención de datos en un estado establecido, pero mi función funciona sin el conjunto de datos.

¿Hay alguna forma de configurar la obtención de datos antes de iniciar el envío?

He hecho algunas soluciones, no funcionó para mí.

gracias por leer esta pregunta

 const uploadPostImage = async () => { const url = `https://localhost:3000/somethingurl`; const formData = new FormData(); formData.append("file", previewImage[0]); formData.append("upload_preset", "something"); const response = await fetch(url, { method: "post", body: formData, }).then(); const data = await response.json(); setNewPost((prev) => ({ ...prev, picture: data.public_id })); <-- **problem here** dispatch(createPost(newPost)); };
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!