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

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(
//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?

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

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