0.3.1 â€Ē Published 1 year ago

sinho v0.3.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

ðŸšĨ Sinho

A lightweight signal-based library for building web components with a React-like API.

  • 🌌 Web standards with custom HTML elements
  • ⚛ïļ React-like API
  • ✒ïļ Declarative templating with JSX (no additional parsing)
  • ðŸšĨ Fine-grained reactivity with signals
  • 🛟 Type-safe components with TypeScript
  • ðŸŠķ Lightweight (~4KB minified and compressed)
import { Component, useSignal, defineComponents } from "sinho";

class Counter extends Component("x-counter") {
  render() {
    const [value, setValue] = useSignal(0);

    return (
      <>
        <p>Counter: {value}</p>
        <p>
          <button onclick={() => setValue((n) => n + 1)}>Increment</button>{" "}
          <button onclick={() => setValue((n) => n - 1)}>Decrement</button>
        </p>
      </>
    );
  }
}

defineComponents(Counter);
0.3.0

1 year ago

0.3.1

1 year ago

0.2.3

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.2.2

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.0

1 year ago