You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.
Caching
observe
that doesn't callget
on each dependency and instead memoizes last seen values.Unify
eager
andlazy
interfacesWhat's the purpose?
observable.lazy
interfaceobservable.lazy
interface can be used to implementanimatable
and reduce code duplicationeager
andlazy
Variants:
observable.eager
andobservable.lazy
observable
andobservable.lazy
observable(1, { lazy: true })
andobservable(1, { lazy: false })
Initialize
observable
with function.What's the purpose?
Negative side effects:
Observable
initialized without value => boxed type isT | undefined
instead ofT
. This is an implementation detail, the public interface is unchanged.Examples:
Lazy as option:
computeLazy
->compute
with{ lazy: true }
observe
starts having lazy as well. What are the use cases for lazy observation?Done:
Observe
with optionsobserve
with or without values:{ collectValues: boolean }
observe
with or without immediate invocation:{ fireImmediate: boolean }
The text was updated successfully, but these errors were encountered: