🌐 US-Proxy
class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
Skip to content

Repository files navigation

fl0

An incremental computation library.

const count = fl0.var(0);
const stars = count.get().map(count => "*".repeat(count));

const countElm = document.querySelector("#count")!;
const inc = document.querySelector("#inc")!;
const dec = document.querySelector("#dec")!;

inc.addEventListener("click", () => {
  count.update((old: number) => old + 1);
});

dec.addEventListener("click", () => {
  count.update((old: number) => old - 1);
});

stars.observe((stars: string) => {
  countElm.textContent = stars;
});

About

An incremental computation library.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Contributors

Languages