title: How to show loading icon till await finishes
body: <p>I have a async function with await fetch.
  I want to show a loading icon to user till the await completes and then show the next div.</p>
  
  <pre><code>                let getOTP = await fetch(url, {
                      method: 'POST',
                      headers: {
                          "Content-Type": "text/plain"     
                      },
                      body: JSON.stringify({
                          "Number": mobileNumber
                      })
                  });
  
                  let data = await getOTP.json();
                  let errorCode = data.errorCode;
                  if (errorCode == 0) {// show next div}
  </code></pre>
  
  <p>I have tried used setTimeout(function (){},5000) functions set to 5 seconds (or more) but sometimes it takes longer for the reply to come. So, How do I show a loading icon till the await completes ?</p>