Reflex
Reflex is a tiny and fast reactive UI library.
- ๐ฆ Super lightweight and 0 dependency, about min-zipped
- ๐ Highly performant diffing algorithm ( Proof )
- ๐ 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
Quick example
# Install with npm
npm i reflex-dom
import { h, render, state } from 'reflex-dom';
export function App (props) {
const counter = state(0);
const increment = () => counter.value++;
const reset = () => counter.value = 0;
return () => <div>
<h1>Hello from {props.name} ๐</h1>
<button onClick={increment}>Increment</button>
<button onClick={reset}>Reset</button>
<span>Counter : {counter}</span>
</div>
}
render( <App name="Reflex" />, document.body );