• 1.11.0 e15316716c

    1.11.0
    All checks were successful
    Unit Tests / Check Unit Tests (push) Successful in 45s
    Stable

    michi released this 2026-07-03 01:31:48 +02:00 | 0 commits to main since this release

    • feat: add keyed() helper for DOM node reconciliation by stable key
      const state = {
        items: [
          { id: "1", label: "item 1" },
          { id: "2", label: "item 2" },
          { id: "3", label: "item 3" },
        ],
      }
      
      app(container, state, (s) => [DIV,
        keyed([UL, { class: "todos" },
          ...s.items.map(it => [LI, { key: it.id }, it.label]),
        ]),
      ]);
      
    • feat: add reconciled to Props which allows you to set a callback when DOM nodes are assinged (reconciled)
      [DIV, {
        reconciled: (state, newVode, oldVode) => {
          const currentNode = newVode[$NODE];
          const previousNode = oldVode?.[$NODE];
          // previousNode will be undefined in first render
          // if children inside the parent are swapped/removed -> currentNode != previousNode
        }
      }]
      
    • refactor!: internal Vode properties encapsulate behind exported Symbols
    • refactor!: expose rendering stats on the state object via state[$STATS] (also still on appNode[$VODE].stats)
    • feat: add missing HTML and MathML tags
    Downloads