ScopeJS v2.0.8

Configurador interactivo

Personaliza un componente real de @pablotheblink/scopejs@2.0.8 en vivo, prueba sus modos y copia el código listo para tu proyecto.

ScopeJS v2.0.8Docs API →
Vista previa en vivoDOM quirúrgico
Inicializando componente ScopeJS…
componente-scopejs.js
javascript
import { Component } from "@pablotheblink/scopejs";

const Counter = Component({
  controller: class {
    constructor() { this.count = 0; this.step = 1; }
    increment() { this.count += this.step; this.apply(); }
  },
  render() {
    return `<h3>Contador: ${this.count}</h3>
      <button onclick="increment()">+${this.step}</button>`;
  },
  style: "padding: 1rem; border-radius: 12px;"
});
Counter.render(document.getElementById("app"));