@proactive/ui
v0.4.0
Published
Proactive UI
Downloads
1
Readme
Proactive UI
Define a component hello-component.ts
import { Observable, interval } from "rxjs";
class HelloComponent {
exclamations: Observable<string>;
constructor(props) {
this.exclamations = interval(500).pipe(map(x => Array(x + 1).join("!")));
}
}
export const template = `<span>Hello, world{{exclamations}}</span>`
export const viewmodel = MyComponent
Start it up startup.ts
import { ProactiveUI } from "@proactive/ui";
import * as hello from "./hello-component";
const ui = new ProactiveUI();
ui.render(hello, document.body);