Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Oct 16, 2024. It is now read-only.
This repository was archived by the owner on Oct 16, 2024. It is now read-only.

watchable computed states #221

Open
Labels
@agile-ts/coreRelated to the @agile-ts/core package enhancementNew feature or request
@leopf

Description

πŸ†• Feature Request

Make computed states watchable.

❓ Is your feature request related to a problem?

It would be nice to react to changes on computed states.

πŸ“„ Describe the solution you'd like

Move the watch and removeWatcher methods from EnhancedState class to the State class. Additionally it would be nice to have a Watchable interface which is implemented on State. Since this proposed change won't make Collections watchable, by implementing the Watchable interface on the Collection class you could make it watchable with a few changes in the future.

The watchable interface would be used where only the watch and removeWatcher methods are used. For example the useWatcher react hook.

πŸ“ƒ Describe alternatives you've considered

Alternatively the Watchable interface is not required, would just be nice to have.

βž• Additional Notes

I have the changes implemented in a fork already. If this feature request is accepted, I would follow up with a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    @agile-ts/coreRelated to the @agile-ts/core package enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /