Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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

Reflex is a tiny and fast reactive UI library.

Awesome Lists containing this project

README

        

# Reflex

__Reflex__ is a tiny and fast reactive UI library.

- ๐Ÿฆ‹ Super lightweight and **0 dependency**, about ![~4kb](../bits/reflex.es2022.min.js.svg) 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

[![npm](https://img.shields.io/npm/v/reflex-dom.svg)](http://npm.im/reflex-dom)
![](https://img.shields.io/badge/Status-Release_Candidate-green)


![](https://img.shields.io/badge/Build-passing-success)
![](https://img.shields.io/badge/0-dependency-success)


[![gzip size](http://img.badgesize.io/https://unpkg.com/reflex-dom/dist/reflex.es2022.min.js?compression=gzip&label=gzip)](https://unpkg.com/reflex-dom/dist/reflex.es2022.min.js)
[![brotli size](http://img.badgesize.io/https://unpkg.com/reflex-dom/dist/reflex.es2022.min.js?compression=brotli&label=brotli)](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 );
```

![](../docs/api/_images/example.gif)

---

## [๐ŸŽฎ - 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/)