0.3.1 â€Ē Published 7 days ago

sinho v0.3.1

Weekly downloads
-
License
MIT
Repository
github
Last release
7 days 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

7 days ago

0.3.1

7 days ago

0.2.3

13 days ago

0.2.1

15 days ago

0.2.0

15 days ago

0.2.2

15 days ago

0.1.2

16 days ago

0.1.1

17 days ago

0.1.4

16 days ago

0.1.3

16 days ago

0.1.0

21 days ago