Closed kailash360 closed 3 years ago
@kailash360 . Looking great ! Change in movie.js of using await keyword in front of fetch doesn't make sense. fetch itself returns a promise and .then() works only after a promise is resolved. So putting an await keyword in front of fetch is of no use. You can read more about it here : https://dmitripavlutin.com/javascript-fetch-async-await/
Also async functions cannot be used like this inside useffect. You need to make a separate async function inside useffect and call it there itself. You can get more idea here : https://dmitripavlutin.com/javascript-fetch-async-await/
Make necessary changes and make a PR again.
@Swarnim01, I have made the changes as asked. Kindly take a look.
Great ! I hope you went through the given resources and must've understood async-await and useffect usage with async functions.
I have added an animated loader for the app. This is how it will look.
Closes #30