JSFiddle - React, Tailwind, and code Playground
by skirtle
HTML
<script src="https://unpkg.com/[email protected]/dist/vue.js"></script>
<div id="app">
<my-func></my-func>
</div>
JavaScript
const GlobalState = Vue.observable({
count: 0
})
new Vue({
el: '#app',
components: {
MyFunc: {
functional: true,
render (h) {
return h('div', `count: ${GlobalState.count}`)
}
}
}
})
setInterval(() => {
GlobalState.count++
}, 1000)