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

264
Views
la solicitud de recuperación no funciona al usar react js y express js, Rechazo no controlado (Error de tipo): No se pudo obtener

Estoy usando el programa react js y express js. Creé un servidor express, sin embargo, mi aplicación react js no funciona con mi express js. Te estoy mostrando códigos de reaccionar js a continuación

 import React, { useEffect, useState } from 'react'; const Get = () => { const [users, setUsers] = useState([]) useEffect(() => { fetch("http://localhost:3000/posts") .then((response) => response.json()) .then((users) => { setUsers(users); }) }, []); return ( <> {users.map((post) => { return ( <div> <p>{post.date}</p> </div> ) })} </> ) } export default Get

Dice

Rechazo no manejado (TypeError): no se pudo obtener

y creo que está conectado con mi solicitud de búsqueda.

Esta es la información en mi servidor:

 [ {"_id":"617fa514d55c0cced18b1f6b","title":"New Title","description":"Hello World","date":"2021-11-01T08:26:52.000Z","__v":0}, {"_id":"617fa52bd55c0cced18b1f6d","title":"New Title","description":"Hello World","date":"2021-11-01T08:26:52.000Z","__v":0}, {"_id":"617fa52cd55c0cced18b1f6f","title":"New Title","description":"Hello World","date":"2021-11-01T08:26:52.000Z","__v":0} ]
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!