Sutil
Sutil copied to clipboard
Preferred way to represent "not yet known" value
Hi,
What is the canonical way to represent "not yet known" value? For example, result of an async expression?
The simplest way (achievable now) is to simply use Store<T option>
.
Stores and their derivations are implementations of IObservable<T>
, which do not guarantee that values are always present (that is, the observable is not "behavior subject", as described here. This would most likely work with current functions (e.g. Bind.el
), however, there is no way to represent "loading" state (or is there?). A possibility would be to add a new function overload with loader
element to be displayed when value is not available yet.
What are your thoughts on this?