Skip to content

Provide hasContext function with createContext #18471

Description

@soleuniverse101

Describe the problem

I find createContext really useful but it only provides get/set functions equivalent to getContext and setContext, while missing the hasContext function. This can be painful because there is no way to check if a context exists if the key is not available. Also trying to get it will throw an error.

Describe the proposed solution

Providing a third function for createContext to return a [get, set, has] triplet.

Importance

nice to have

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