JSFiddle - React, Tailwind, and code Playground

by jahongirsobirov

HTML

<script src="https://signel.onrender.com/signel.js"></script>
<div id="app">
  <div id="my-tree">
    <b id="tree-btn">My tree $$btn</b>
  </div>
</div>

JavaScript

let myTree = state({ btn: '[+]'})
dom('#tree-btn').bind(myTree)
dom('#tree-btn').css('cursor:pointer').click(()=> myTree.btn = myTree.btn === '[+]' ? '[-]' : '[+]')