Sha256: 3ddb5bd6516ec6d029cf2a49820684b2cf2bf7282c9d6e388aba6fdd3e861e35
Contents?: true
Size: 509 Bytes
Versions: 15
Compression:
Stored size: 509 Bytes
Contents
import { Box } from "./box"; export class Component { id: string; _state: any; _errors: any[]; _root: Box; constructor(state: any = {}, id: string = Math.random().toString(36).substring(2, 10), errors: any[] = []) { this._state = state; this.id = id; this._errors = errors; this._root = new Box({ data: { component: this.constructor.name, state: JSON.stringify(this._state), id: this.id, errors: this._errors } }); } get render(): string { return this._root.render; } }
Version data entries
15 entries across 15 versions & 1 rubygems