JSFiddle - React, Tailwind, and code Playground

by jahongirsobirov

HTML

<script src="https://signel.onrender.com/signel.js"></script>
<div id="app">
  <h3>Multi checkbox</h3>
  <input type="checkbox" name="" id="jonh" $click='addName'>
  [<span $text="checkedNames"></span>]
</div>

JavaScript

let state = reactive({
  checkedNames: [],
  addName() {
    console.log(this)
    this.checkedNames.push("john")
  }
})

compile('#app', state)