Skip to content

Add PromiseInvalidationToken.cancelWithoutInvalidation() #23

@lilyball

Description

@lilyball

It may be useful to have a PromiseInvalidationToken.cancelWithoutInvalidation() method that cancels any associated promises without invalidating the token.

The use-case here is when you want to cancel e.g. a request but you're not kicking off a replacement, so you want any onCancel and always handlers to fire. As the recommended style is to not hold onto Promises directly but to just hold onto the token, we need some way to cancel the associated promises without actually invalidating the token.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions