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

133
Views
Problemas de red al usar una API en React Native

Sé que hay otros artículos como este, pero no ayudaron a mi problema. Traté de conectar una API escrita en Django a mi aplicación de reacción y probé en modo web, todo estaba bien. Cuando traté de hacer esto en el emulador, aparece el siguiente error

 Unhandled promise rejection: Error: Network Error] at node_modules/axios/lib/core/createError.js:16:14 in createError at node_modules/axios/lib/adapters/xhr.js:99:24 in handleError at node_modules/react-native/Libraries/Network/XMLHttpRequest.js:600:10 in setReadyState at node_modules/react-native/Libraries/Network/XMLHttpRequest.js:395:6 in __didCompleteResponse at node_modules/react-native/Libraries/vendor/emitter/EventEmitter.js:189:10 in emit

Y mi objeto está vacío. De esta manera me hago cargo de los datos

 const data = async () => { const response = await axios.get('http://localhost:8000/api/data/'); setFriends(response.data); }; React.useEffect(() => { data(); }, []);

Probé con mi ip local y la presentada en el emulador pero los mismos problemas ¿Sabes por qué está pasando esto?

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!