JSFiddle - React, Tailwind, and code Playground

by Zheng Haibo

HTML

<script src="https://rawgit.com/regularjs/regular/master/dist/regular.js"></script>

JavaScript

new Regular({
  template: "<button on-click={this.add(1, $event)}> count+1 </button><b>{count}</b>",
  data: {count:1},
  add: function(count, $event){
    this.data.count += count;
    alert($event.pageX);
  }
}).$inject(document.body);