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

113
Views
Los datos se agregan en la matriz pero no se muestran en la interfaz de usuario hasta que se vuelve a cargar

Estoy publicando nuevos datos en el backend. Se está enviando con éxito, pero la sección donde obtuve estos datos no se actualiza hasta que presiono recargar en el navegador.

Aquí estoy agregando el código. Por favor, hágame saber dónde estoy haciendo el problema. Muchas gracias.

 //This is a custom hook where I am fetching data. const [products, setProducts] = useProductsHook(); const handleAddProduct = () => { const newProduct = { name: productName, image: imageLink, desc: desc, price: +price, quantity: +quantity, supplier: supplierName, }; axios.post("http://localhost:5000/api/products", newProduct).then((res) => { setProducts(products.concat(res.data)); setProductName(""); setImageLink(""); setDesc(""); setPrice(""); setQuantity(""); setSupplierName(""); }); };
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!