https://github.com/yishn/sinho
A lightweight signal-based library for building web components with a React-like API.
https://github.com/yishn/sinho
dom fine-grained-reactivity frontend js react signal ts ui webcomponents
Last synced: about 1 month ago
JSON representation
A lightweight signal-based library for building web components with a React-like API.
- Host: GitHub
- URL: https://github.com/yishn/sinho
- Owner: yishn
- License: mit
- Created: 2022-10-10T23:19:27.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2026-01-28T13:22:11.000Z (about 2 months ago)
- Last Synced: 2026-01-29T05:50:00.024Z (about 2 months ago)
- Topics: dom, fine-grained-reactivity, frontend, js, react, signal, ts, ui, webcomponents
- Language: TypeScript
- Homepage: https://yishn.github.io/sinho/
- Size: 633 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ðĨ 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)
```tsx
import { Component, useSignal, defineComponents } from "sinho";
class Counter extends Component("x-counter") {
render() {
const [value, setValue] = useSignal(0);
return (
<>
Counter: {value}
setValue((n) => n + 1)}>Increment{" "}
setValue((n) => n - 1)}>Decrement
>
);
}
}
defineComponents(Counter);
```