Skip to content
This repository was archived by the owner on Feb 14, 2023. It is now read-only.
This repository was archived by the owner on Feb 14, 2023. It is now read-only.

Support property-specific callbacks. #148

@m4ttheweric

Description

@m4ttheweric

Hi there,

I am looking for a way for code that is not within a component to subscribe to change to state, akin to an rxjs Subject. I have some api code that needs to make use of a Provider state that has the current path to the host, and if the path changes, it needs to be able to respond accordingly.

Currently, addCallback is my only option, but I have to set up manual checking for if the state property I am concerned about changes, and it feels a bit clunky and unnecessary to be executing on every state change.

Am I missing any current capabilities that would work for this situation? Perhaps something in addCallback that gives detail on what state changed?

Thanks!

Matt

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureA new feature is requested.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions