Tiny (2 KB) turboboosted JavaScript library for creating user interfaces.
import { list, viewFactory } from 'redom';
class A {
constructor () {
this.el = el('a');
}
update () {
...
}
}
class B {
constructor () {
this.el = el('b');
}
update () {
...
}
}
const items = list('items', viewFactory({ a: A, b: B }, 'type'), 'id');
items.update([{ id: 1, type: 'a' }, { id: 2, type: 'b' }]);
––>
<items>
<a></a>
<b></b>
</items>
#439
Type issue fixed, thank you @flery and @joona!