Skip to content

Preferred way to represent "not yet known" value #85

@sajagi

Description

@sajagi

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions