Value.Diff produces property-level diff payloads instead of relying
solely on prepareUpdate. Function-valued props are stripped before
diffing; ValueDiffError is caught and falls back to prepareUpdate.
Value.Equal and Value.Clone now safely handle function-valued props
with try-catch fallbacks.
Adds hash field to Fiber<I> for caching FNV-1a hash after each commit.
Hash comparison runs before Value.Equal in reconcileProps for fast bail-out
on unchanged subtrees. Hashes computed during commit phase only (outside
reactive computations) via commitHashes after commitEffects.
Add TypeBox Value.Equal deep-comparison as first optimization layer
in reconcileProps. When a fiber's cached node is deep-equal to the
next node, skip prepareUpdate, commitUpdate, and children
reconciliation entirely. New cachedNode field on Fiber stores the
last reconciled node for comparison.
Adds ReactiveRoot.dispose() which calls render effect disposer, iterates
all tracked subscriber disposers, and clears internal state. subscribe()
now tracks effect disposers in a Set and returns idempotent unsubscribe.
render() now disposes previous render effect before overwriting. Both
reactiveComponent and reactiveElement return real dispose functions that
sever the computed signal reference on disposal.
Add disposeFiber() function that performs bottom-up teardown of fiber
subtrees: recursively disposes children before parents, calls
host.finalizeInstance for per-instance cleanup, invokes signal disposers,
and clears fiber state. Idempotent via disposed flag. Does NOT call
host.removeChild (that's the commit phase's job).
- Add disposeFiber + HostLike to src/host/fiber.ts
- Add finalizeInstance to HostConfig interface
- Add disposed boolean to Fiber interface
- Export disposeFiber and HostLike from barrel
- Add 7 tests for disposeFiber (3-level tree, idempotency, signal cleanup, etc.)
Adds commitMutations function to reconcile.ts that processes fiber effects
in correct order: removes (reverse), inserts+moves (left-to-right with
insertBefore), updates (top-down). Integrates key-based reconciliation
pipeline into render() via reconcileNode, resolveUNode, and
createFiberForInsert.
First render still does a full mount and builds fiber tree. Subsequent
renders reconcile the new UNode tree against existing fibers: compare
props via prepareUpdate, apply changes via commitUpdate. Excess old
children remain (structural changes deferred to Phase 2). Function
components remain transparent during reconciliation.