ivi ·
ivi is a javascript (TypeScript) library for building web user interfaces.
Package | NPM version |
---|---|
ivi | |
ivi-core | |
ivi-scheduler | |
ivi-events | |
ivi-html | |
ivi-svg |
- Declarative rendering with "Virtual DOM"
- Components (stateless functions and stateful ES2015 classes)
- Connectors for sideways data loading
- Implicit data propagation with contexts
- Extensible synthetic event subsystem
- Synchronous and deterministic syncing algorithm
- Children reconciliation with minimum number of DOM operations
- Fast performance
- Test utilities
Size of the basic example bundled with webpack and minified with uglify is just a 3.8KB (minified+compressed).
ivi is one of the fastest libraries in the js-framework-benchmark.
It is quite easy to get good results in this benchmark by focusing on optimizations of low-level primitives. But the primary goal of the ivi architecture is to reduce overhead of abstractions, and that is why it is still one of the fastest implementations in this benchmark even when benchmark implementation for ivi library is using stateful components and connectors.
The easiest way to get started with ivi is to use this basic example code on CodePen or this one on CodeSandbox.
The smallest ivi example looks like this:
import { render } from "ivi";
import { h1 } from "ivi-html";
render(
h1().c("Hello World!"),
document.getElementById("app"),
);