JSFiddle - React, Tailwind, and code Playground

by Simon Herteby

HTML

<div id="vue">
  {{foo | que}}
</div>

Vue

new Vue({
	el:'#vue',
  data(){
  	return {
    	foo:new Promise(resolve => {
      	setTimeout(()=> resolve('hej'), 500)
      })
    }
  },
  filters:{
    que(promise){
    	return 'blah'
    	const obj = {}
      Vue.util.defineReactive(obj, 'val', 'loading')
      promise.then(result => obj.val = result)
      return obj.val
    }
  }
})
window.Vue = Vue