JSFiddle - React, Tailwind, and code Playground

by Maiki Nahara

HTML

<div id='text'></div>

CSS

#test {
width: 300px;
height: 300px;
}

JavaScript

const text = document.querySelector('#text')
text.innerText = ''

async function main() {
	text.innerText = 'starting'
  let txReceipt = ''
  let count = 0
  while (!txReceipt) {
    // txReceipt = await axios.get('https://backend-dg-ice.ddns.net/v1/marketplace')
  	setTimeout(() => {txReceipt = 1}, 10)
    text.innerText += '\n' + count
		count++
  }
  text.innerText += '\n done' 
}

text.innerText = ''
debugger
main()