The app is supposed to work such that the getData
function returns a promise(its an asynchronous function)
and we use it inside the component on mount to get data and display it. But there needs to be some changes made to
getData
function such that it works inside the component.
Note:- Do not change code inside app component, only change getData
function.