How to use the hyperhtml/esm/index.js.bind function in hyperhtml

To help you get started, weโ€™ve selected a few hyperhtml examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jcgregorio / vanillajs / angular-todo / modules / todo-vanilla / todo-vanilla.js View on Github external
render() {
    bind(this)`
     <h2>Todo</h2>
     <div>
       <span>${this.remaining()} of ${this.todos.length} remaining</span>
       [ <a href=""> this.archive(e)} &gt;archive</a> ]
     <ul class="unstyled">
      ${ this.todos.map( (item, index) =&gt; wire(item)`<li><label>
             <input data-index="${index}"> this.done(e)} type=checkbox checked=${item.done}/&gt;
             <span>${item.text}</span>
        </label></li>`)}
     </ul>
      <form> this.addToDo(e)}&gt;
        <input id="text" placeholder="add new todo here" size="30" type="text">
        <input value="add" type="submit">
      </form>
    </div>`;
  }

hyperhtml

A Fast & Light Virtual DOM Alternative

ISC
Latest version published 2 years ago

Package Health Score

56 / 100
Full package analysis