Announcing two new packages: reactive fields and computed fields. Reactive fields have in my opinion a nicer syntax for reactive vars, no need for .get
and .set
anymore, you just call the function field()
or set it to new value by passing an argument field(newValue)
.
Computed field allow you to wrap a computation in a way to prevent unnecessary reactivity propagation, because reactivity propagates only when the result of a computation changes, not if internal dependencies change. The good thing is that despite using autorun internally, it cleans itself up automatically when not needed/used anymore.