MemoNode<T> class

Memoization boundary — only re-evaluates builder when dependency produces a value that differs (!=) from its previous value.

DOM Mounting and Sentinels

In the browser, MemoNode mounts between a pair of sentinel comments: <!-- bloom:memo --> and <!-- /bloom:memo -->.

Tracks signal reads inside dependency. When an upstream signal updates, dependency is re-evaluated. If the returned value is identical or equal (==) to the previous value, builder is not re-run and the existing DOM is preserved. Only when the value changes (!=) is builder called with the new value to update the DOM region.

SSR Behavior

In SSR (renderToHtml), dependency is called once and its result is passed to builder to render the initial markup.

Usually created using the DSL sugar Memo.

Inheritance

Constructors

MemoNode(T dependency(), BloomNode builder(T value))
Creates a memoization boundary descriptor with dependency and builder.
const

Properties

builder BloomNode Function(T value)
Builder that produces a descriptor tree from the evaluated dependency value.
final
builderErased BloomNode Function(Object? value)
builder, accepting an untyped Object? dependency value.
no setter
dependency → T Function()
Reactive computation returning the dependency value of type T.
final
dependencyErased Object? Function()
dependency, viewed untyped as Object? Function().
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited