Async await is the sugar coated over the promises. Easy to write and understand the resolve, reject state of function data. Simple Dashaboard application created with different API's like
- Random user - https://randomuser.me/api/
- Currency rate exchange - https://open.er-api.com/v6/latest/USD
- Weather data - https://fcc-weather-api.glitch.me/api/current?lat=${lat}&lon=${lon}
- Current news - https://testimonialapi.toolcarton.com/api
Partial page update while switching from news section to comment section. Random user details get fetch via click of button and with details of user location get currency rate exchange of country and weather of the city. Change the News category from dropdown and get news based on selected category. Interlinking of data and dependency give real world example.
Exlpore the demo file and download the mini project to understand the ES6 functionalities and how it is easy to maintain code increase readadility and compare the previous project Fetch API GIT data where use case of then().catch() which simplified with use of async await keyword.
Check working code at Codesandbox Link