Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: 2 months ago
JSON representation

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

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);
```