@smlr/core
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

@smlr/core

Frontend framework

Work in progress - not ready for production 🚧

import { render, cp, htm, signal, computed } from "@smlr/core";

const Counter = cp(() => {
  const count = signal(0);
  const doubleCount = computed(() => count.value * 2);

  return [
    htm("div", { node: ["Count is: ", () => count.value] }),
    htm("div", { node: ["Double count is: ", () => doubleCount.value] }),
    htm("button", {
      onClick: () => {
        count.value++;
      },
      node: "+",
    }),
  ];
});

render(Counter(), container);

Readme

Keywords

Package Sidebar

Install

npm i @smlr/core

Weekly Downloads

10

Version

0.0.3

License

MIT

Unpacked Size

199 kB

Total Files

55

Last publish

Collaborators

  • dusanjovanov