Releases: ryupold/vode
Releases · ryupold/vode
Release list
1.11.0
- 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
reconciledto 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
1.10.2
1.10.1
1.10.0
- feat: preserve identity of class instances (Date, RegExp, etc.) during state merges
- feat: improve app() state type inference and event handler typings
- fix: standardize mergeClass behavior for strings and objects
- fix: handle string as 2nd argument to vode(tag, string) correctly
- fix: style property clearing
- fix: ensure async rendering only proceeds if asyncRenderer is explicitly available
- fix: correctly skip bigint child nodes
- refactor(mergeStyle): normalize return types and improve string merging
- refactor(state-context): refine put() input type
- feat: add fallback for mergeStyle() in non-browser environments
1.9.4
1.9.3
1.9.2
1.9.1
1.9.0
- fix(catch): usage of 'catch' on the root vode with different Tag
NOTE: changing the root tag in vode during rendering is supported, but results in a new container node
to get a reference to the new container node:const newContainer = oldContainer._vode.vode.node - feat(state-context): add overload to context() for alternative substate targeting