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

145
Views
How to fetch data from API in React Native

I am trying to fetch data from API on my localhost server using "Axios" in React Native but I am stuck that how can i do This is my react code that same i have to convert in react native

export function blog(props){
const posts = useAPI ('/api/posts');
return (
<ul>
{posts?.data && 
posts.data.map((post) => (
<li>
{posts.name}
</li>
))
}
);
}

export default blog;

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You have to make a proper API endpoint

like your localhost
localhost:8080/api/posts then you have use like this
1: Know your IP address (192.168.1.1)

you can get IP address in cmd in windows: ipconfig
you can get IP address in System Preference/Networ/Selected Network / Info in mac

2: Your endpoint will be look like this
http://192.168.1.1/api/posts

about 4 years ago · Santiago Trujillo Report
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!