# Calling Back end Services - 4 - Getting Data... Question

**URL:** <https://forum.codewithmosh.com/t/calling-back-end-services-4-getting-data-question/3933>\
**Category:** React\
**Created:** [April 7, 2021, 9:08am UTC](https://forum.codewithmosh.com/t/calling-back-end-services-4-getting-data-question/3933 "2021-04-07T09:08:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kvngamboa](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/kvngamboa/32/1404_2.png) [@kvngamboa](https://forum.codewithmosh.com/u/kvngamboa)\
**Post date:** [April 7, 2021, 9:08am UTC](https://forum.codewithmosh.com/t/calling-back-end-services-4-getting-data-question/3933/1 "2021-04-07T09:08:05Z")

</div>

Hi coders!

I’m currently working on getting data from JSON placeholders as per the lesson with Mosh.

In this video, we used async await to retrieve the data. I understand that async works as a parallel programming where it runs units of the code behind.

So now when applying async await to this particular code:

```
async componentDidMount() {
//pending > resolved or failure
const { data: posts } = await axios.get(
"https://jsonplaceholder.typicode.com/posts"
);
//set it into the state so then we can use it.
this.setState({ posts });
}

```

What I’m trying to understand here is more on the benefits. Is it right for me to assume that… by applying async await, the Vidly app as a whole when it loads it **does not** depend to wait for the JSON placeholder data to load first right?

---

<div class="post-metadata">

**Author:** ![AzharUddinSheikh](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/azharuddinsheikh/32/5561_2.png) [@AzharUddinSheikh](https://forum.codewithmosh.com/u/AzharUddinSheikh)\
**Post date:** [January 13, 2023, 4:03pm UTC](https://forum.codewithmosh.com/t/calling-back-end-services-4-getting-data-question/3933/2 "2023-01-13T16:03:24Z")

</div>

`first` this code will throw `error boundary` which means you havn’t handle the `error` via `try catch` block

> [@kvngamboa](#):
>
> the Vidly app as a whole when it loads it **does not** depend to wait for the JSON placeholder data to load first right

this is what we call `asynchronous`  
one `function` will not wait for `other`
