Skip to content

AsyncComputed: no way to return to initial state #86

@justinfagnani

Description

@justinfagnani

Once an async computed task has been executed, there is no way to return it to it's "initial" state.

In Lit's Task we provide an initialState sentinel value that a compute function can return to put the Task back into the initial state. It might also be nice to have a reset() method to do this from outside the compute function. It should clear the current error and restore the initial value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions