Table of Contents

Class MemoNode

Namespace
Velvet
Assembly
Velvet.Docs.dll

Node that skips rebuilding its child tree when the dependency array is unchanged. When omitting key, do not change the order of MemoNodes within the same component, since identity is resolved by call order.

public sealed class MemoNode : VNode
Inheritance
object
MemoNode
Inherited Members

Properties

Dependencies

Dependency array. Compared element-wise (Velvet.ObjectIs.AreEqualDeps(object[], object[])) on each element's runtime type: float and double by raw bit pattern, string by ordinal content, any other value type by its own equality — so a record struct of equal content is unchanged — and any other reference type by instance, so a fresh record class instance of equal content is a change. Where the two branches part is how far the comparison reads: the reference branch reads the instance and stops, while the value branch is the element's own Equals, which answers for its fields in turn — a nested record class field by that record's content. An empty array declares no dependencies and caches for the node's whole life; null declares no dependency array, which no newly built node's comparison can satisfy.

Factory

Factory function that produces a VNode.