JSFiddle - React, Tailwind, and code Playground

VueJS async component ,,, forked from https://jsfiddle.net/Akryum/ft0dmoex/

by dledle2

HTML

<!-- Include the library in the page -->
<script src="https://unpkg.com/vue"></script>

<!-- App -->
<div id="app">
  <button @click="show ^= 1">Toggle</button>
  <async-example v-if="show"/>
</div>

JavaScript

console.clear()
console.log('Yes! We are using Vue version', Vue.version)

Vue.component('async-example', function (resolve, reject) {
  console.log('resolving component...')
  setTimeout(function () {
    resolve({
      template: '<div>I am async!</div>'
    })
  }, 1000)
})

// New VueJS instance
var app = new Vue({
	// CSS selector of the root DOM element
  el: '#app',
  // Some data
  data: () => ({
    show: false,
  }),
})