3 ms·
Develop lightweight and declarative UI with automatic dependecy tracking without boilerplate code, VDOM, nor compiler. The concept is to use Proxy API to wrap
by aabbcc1241 3y ago
Develop lightweight and declarative UI with automatic dependecy tracking without boilerplate code, VDOM, nor compiler.
The concept is to use Proxy API to wrap the DOM object, and auto keep track of the dependency of some reactive statements.
The DOM event listener is auto setup to trigger re-run when the UI is updated by user, and the proxy setter triggers re-run when other part of code is updating the reactive statement's dependency.
The current implementation is a lightweight library with inferred Typescript types.
This design could be extended to support server side rendering as well.