# React Native Part 2 (Networking: Fetching Data)

**URL:** <https://forum.codewithmosh.com/t/react-native-part-2-networking-fetching-data/1250>\
**Category:** React Native\
**Created:** [December 13, 2020, 6:01am UTC](https://forum.codewithmosh.com/t/react-native-part-2-networking-fetching-data/1250 "2020-12-13T06:01:33Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Ben](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@Ben](https://forum.codewithmosh.com/u/Ben)\
**Post date:** [January 14, 2021, 9:23pm UTC](https://forum.codewithmosh.com/t/react-native-part-2-networking-fetching-data/1250/21 "2021-01-14T21:23:16Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/1X/76a8c51d8feaad28f2293efaab374fcef7e2a38e.png)

---

<div class="post-metadata">

**Author:** ![aarongraham](https://avatars.discourse-cdn.com/v4/letter/a/e9a140/32.png) [@aarongraham](https://forum.codewithmosh.com/u/aarongraham)\
**Post date:** [January 14, 2021, 9:35pm UTC](https://forum.codewithmosh.com/t/react-native-part-2-networking-fetching-data/1250/22 "2021-01-14T21:35:53Z")

</div>

Is this part of section 3?

Thanks,

---

<div class="post-metadata">

**Author:** ![Ben](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@Ben](https://forum.codewithmosh.com/u/Ben)\
**Post date:** [January 14, 2021, 11:54pm UTC](https://forum.codewithmosh.com/t/react-native-part-2-networking-fetching-data/1250/23 "2021-01-14T23:54:07Z")

</div>

Yes network, my response.data is empty! and I have a strange message saying the await has no effect …!

---

<div class="post-metadata">

**Author:** ![aarongraham](https://avatars.discourse-cdn.com/v4/letter/a/e9a140/32.png) [@aarongraham](https://forum.codewithmosh.com/u/aarongraham)\
**Post date:** [January 15, 2021, 12:13am UTC](https://forum.codewithmosh.com/t/react-native-part-2-networking-fetching-data/1250/24 "2021-01-15T00:13:13Z")

</div>

…and did you compare your file with the ending file of the download?

\Part 2\Section 3- Networking\End \<–he provides this via his github 🙂

Thanks

---

<div class="post-metadata">

**Author:** ![Ben](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@Ben](https://forum.codewithmosh.com/u/Ben)\
**Post date:** [January 15, 2021, 11:10pm UTC](https://forum.codewithmosh.com/t/react-native-part-2-networking-fetching-data/1250/25 "2021-01-15T23:10:32Z")

</div>

Thank you mate, yes but in this part, he already deleted it and replaced other modules, anyway, I think I will not dig more and follow your first suggestion by copying the code, thank you mate, appreciate your help

---

<div class="post-metadata">

**Author:** ![aarongraham](https://avatars.discourse-cdn.com/v4/letter/a/e9a140/32.png) [@aarongraham](https://forum.codewithmosh.com/u/aarongraham)\
**Post date:** [January 15, 2021, 11:31pm UTC](https://forum.codewithmosh.com/t/react-native-part-2-networking-fetching-data/1250/26 "2021-01-15T23:31:34Z")

</div>

It’s all good…  
…We all did the same thing. We try to figure it out for hours (sometimes days). Then we copy the code and realize it was a freaking “;” or “)” or “}” or something like that.

At least each section is divided in the part 2 download which has a “start” before code changes and “end” after all the videos of that section “changes”.

Good luck!

---

<div class="post-metadata">

**Author:** ![Ben](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@Ben](https://forum.codewithmosh.com/u/Ben)\
**Post date:** [January 16, 2021, 10:23am UTC](https://forum.codewithmosh.com/t/react-native-part-2-networking-fetching-data/1250/27 "2021-01-16T10:23:08Z")

</div>

unfortunately, “end” is the end of all video and files there is no version between, it would be much better, thank you again.

---

<div class="post-metadata">

**Author:** ![aarongraham](https://avatars.discourse-cdn.com/v4/letter/a/e9a140/32.png) [@aarongraham](https://forum.codewithmosh.com/u/aarongraham)\
**Post date:** [January 16, 2021, 5:46pm UTC](https://forum.codewithmosh.com/t/react-native-part-2-networking-fetching-data/1250/28 "2021-01-16T17:46:48Z")

</div>

let me know if you are able to download these files…  
…[https://github.com/aarongraham518/forbenya](https://github.com/aarongraham518/forbenya)

Aaron

---

<div class="post-metadata">

**Author:** ![aarongraham](https://avatars.discourse-cdn.com/v4/letter/a/e9a140/32.png) [@aarongraham](https://forum.codewithmosh.com/u/aarongraham)\
**Post date:** [January 16, 2021, 5:47pm UTC](https://forum.codewithmosh.com/t/react-native-part-2-networking-fetching-data/1250/29 "2021-01-16T17:47:20Z")

</div>

It’s the end of the Networking section 3

---

<div class="post-metadata">

**Author:** ![Ben](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@Ben](https://forum.codewithmosh.com/u/Ben)\
**Post date:** [January 17, 2021, 2:06pm UTC](https://forum.codewithmosh.com/t/react-native-part-2-networking-fetching-data/1250/30 "2021-01-17T14:06:24Z")

</div>

Thank you mate, appreciated really your help, my last issue was in the pictures, I couldn’t retrieve them even that I have all the object back! anyway, it’s another issue that I have to resolve before checking the details.

---

<div class="post-metadata">

**Author:** ![Ben](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@Ben](https://forum.codewithmosh.com/u/Ben)\
**Post date:** [January 21, 2021, 9:13pm UTC](https://forum.codewithmosh.com/t/react-native-part-2-networking-fetching-data/1250/31 "2021-01-21T21:13:33Z")

</div>

Hello,  
I found the route cause !  
On the server-side: change the address to your **development.json**  
Regards

---

<div class="post-metadata">

**Author:** ![Alena11](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/alena11/32/937_2.png) [@Alena11](https://forum.codewithmosh.com/u/Alena11)\
**Post date:** [February 13, 2021, 11:05am UTC](https://forum.codewithmosh.com/t/react-native-part-2-networking-fetching-data/1250/32 "2021-02-13T11:05:34Z")

</div>

same problem ☹ nothing from suggested solution is working for me

---

<div class="post-metadata">

**Author:** ![aarongraham](https://avatars.discourse-cdn.com/v4/letter/a/e9a140/32.png) [@aarongraham](https://forum.codewithmosh.com/u/aarongraham)\
**Post date:** [February 14, 2021, 9:17pm UTC](https://forum.codewithmosh.com/t/react-native-part-2-networking-fetching-data/1250/33 "2021-02-14T21:17:29Z")

</div>

any luck? same exact problem? can you provide screenshots of the relevant pages?

---

<div class="post-metadata">

**Author:** ![klincoder](https://avatars.discourse-cdn.com/v4/letter/k/8edcca/32.png) [@klincoder](https://forum.codewithmosh.com/u/klincoder)\
**Post date:** [March 23, 2021, 12:59pm UTC](https://forum.codewithmosh.com/t/react-native-part-2-networking-fetching-data/1250/34 "2021-03-23T12:59:29Z")

</div>

I did this and it worked… listings are showing but images are not showing. I figured out it was pointing to a different IP address as seen in the image. How do I change the IP address for the image url?

 ![troubleshoot](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/2/2ecca6b041256bd9222cf3a01eb6cab9bda2f169.png)

---

<div class="post-metadata">

**Author:** ![klincoder](https://avatars.discourse-cdn.com/v4/letter/k/8edcca/32.png) [@klincoder](https://forum.codewithmosh.com/u/klincoder)\
**Post date:** [March 23, 2021, 1:06pm UTC](https://forum.codewithmosh.com/t/react-native-part-2-networking-fetching-data/1250/35 "2021-03-23T13:06:39Z")

</div>

I’ve figured it out… Go to the backend window and update the new IP address.

config → development.json

Goodluck!

---

<div class="post-metadata">

**Author:** ![jzironman](https://avatars.discourse-cdn.com/v4/letter/j/54ee81/32.png) [@jzironman](https://forum.codewithmosh.com/u/jzironman)\
**Post date:** [March 25, 2021, 10:37am UTC](https://forum.codewithmosh.com/t/react-native-part-2-networking-fetching-data/1250/36 "2021-03-25T10:37:03Z")

</div>

Help me i cannot start the server. first part about setting up the back end.  
I tried to run ‘node index.js’ but it says cannot found module/ express.

---

<div class="post-metadata">

**Author:** ![kibetboniface](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/kibetboniface/32/1206_2.png) [@kibetboniface](https://forum.codewithmosh.com/u/kibetboniface)\
**Post date:** [March 25, 2021, 4:42pm UTC](https://forum.codewithmosh.com/t/react-native-part-2-networking-fetching-data/1250/37 "2021-03-25T16:42:55Z")

</div>

I am getting this error please help

 ![errror5](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/b/b54c611dbca342c92db44b82f2a531f6b10e7c92.png)

@SAM @sollazzo08 thanks a lot it works 👍

---

<div class="post-metadata">

**Author:** ![kibetboniface](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/kibetboniface/32/1206_2.png) [@kibetboniface](https://forum.codewithmosh.com/u/kibetboniface)\
**Post date:** [March 25, 2021, 4:43pm UTC](https://forum.codewithmosh.com/t/react-native-part-2-networking-fetching-data/1250/38 "2021-03-25T16:43:28Z")

</div>

![error4](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/6/64b3921ee0dc82279dc996cf30e8eec17b42e42d.png)

---

<div class="post-metadata">

**Author:** ![kibetboniface](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/kibetboniface/32/1206_2.png) [@kibetboniface](https://forum.codewithmosh.com/u/kibetboniface)\
**Post date:** [March 25, 2021, 4:44pm UTC](https://forum.codewithmosh.com/t/react-native-part-2-networking-fetching-data/1250/39 "2021-03-25T16:44:00Z")

</div>

![error3](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/9/96c5a213303f9fd69fb3563dea390b192cd1e70a.png)

---

<div class="post-metadata">

**Author:** ![sollazzo08](https://avatars.discourse-cdn.com/v4/letter/s/f08c70/32.png) [@sollazzo08](https://forum.codewithmosh.com/u/sollazzo08)\
**Post date:** [March 25, 2021, 10:06pm UTC](https://forum.codewithmosh.com/t/react-native-part-2-networking-fetching-data/1250/40 "2021-03-25T22:06:06Z")

</div>

I had the same exact issue! I was looking for hours! Until I found it… Ready for this one.

`const getListings = () => { apiClient.get(endpoint)`; };

should be…

`const getListings = () => apiClient.get(endpoint);`

notice the difference?

There are brackets. I am not an expert but I believe if you are using the arrow function with brackets, then you are calling this function immediately, but if you don’t use the brackets then you are storing a reference to the property so it can be called later on.

I think!

[Previous page](https://forum.codewithmosh.com/t/react-native-part-2-networking-fetching-data/1250.md?page=1)

[Next page](https://forum.codewithmosh.com/t/react-native-part-2-networking-fetching-data/1250.md?page=3)
