https://github.com/zouloux/reflex-dom
Reflex is a tiny and fast reactive UI library.
https://github.com/zouloux/reflex-dom
dom preact react reactive state-management ui vdom vdom-library virtual-dom
Last synced: 6 months ago
JSON representation
Reflex is a tiny and fast reactive UI library.
- Host: GitHub
- URL: https://github.com/zouloux/reflex-dom
- Owner: zouloux
- License: mit
- Created: 2022-06-16T18:39:22.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-06T16:25:56.000Z (about 1 year ago)
- Last Synced: 2025-04-01T17:53:24.989Z (7 months ago)
- Topics: dom, preact, react, reactive, state-management, ui, vdom, vdom-library, virtual-dom
- Language: TypeScript
- Homepage:
- Size: 7.76 MB
- Stars: 14
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: .github/README.md
- License: LICENSE
Awesome Lists containing this project
README
# Reflex
__Reflex__ is a tiny and fast reactive UI library.
- ๐ฆ Super lightweight and **0 dependency**, about  min-zipped
- ๐ Highly performant diffing algorithm
- ๐ Batteries included with **factory extensions**
- โ๏ธ Truly reactive, states are Signals by design
- ๐ Fine grained DOM updates for even better performances, components are rendered only when needed
- ๐ค Typed JSX
- ๐ฐ Easy to learn
- ๐ค๏ธ HMR Support for Vite
- ๐ Super fast hydration support[](http://npm.im/reflex-dom)



[](https://unpkg.com/reflex-dom/dist/reflex.es2022.min.js)
[](https://unpkg.com/reflex-dom/dist/reflex.es2022.min.js)---
## Quick example
```shell
# Install with npm
npm i reflex-dom
``````typescript jsx
import { h, render, state } from 'reflex-dom';
export function App (props) {
// State management
const counter = state(0);
const increment = () => counter.value ++;
const reset = () => counter.value = 0;
// Components returns a render function
return () =>
Hello from {props.name} ๐
Incrementย
Resetย
Counter : {counter}
}
render( , document.body );
```
---
## [๐ฎ - Play with this example on StackBlitz](https://stackblitz.com/edit/node-freprp?file=index.tsx)
## [๐จโ๐ซ - Learn Reflex in 5 minutes](https://zouloux.github.io/reflex/learn/)
## [๐ - See API documentation](https://zouloux.github.io/reflex/api/)