Skip to content

Implement Context.unsubscribe() method #18

@dev101

Description

@dev101

Don't you feel the need for Context.unsubscribe() method?
E.g. I want my component to listen for event only if it is active. So i call Context.listen() in component's .activate() function (imagine I don't use viewmodels). Currently there is no way to unsubscribe when the component is deactivated, meaning the event handler will be called anyway. But i don't want to handle this event when the component is hidden because e.g. it changes look&feel of component based on event data - it's a waste of resources.

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