-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add signals as a container to store state #1
Conversation
stwa
commented
May 6, 2019
- Used as the root of state propagation.
- Encapsulated state can be reset or updated.
- Outputs can be connected and will be triggered on state changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the proposed nomenclature. Added an alternative wording to the docs. Hope you like it.
Thanks for your feedback! I added another commit adding signals based on a functions return value. A signalFn can reference other (input) signals which are then tracked and any state changes will propagate through the signal chain. |
* Used as the root of state propagation. * Encapsulated state can be reset or updated. * Outputs can be connected and will be triggered on state changes.
* Encapsulated state from function return value. * Tracks input signals and recomputes on any state change. * Outputs can be connected and will be triggered on state changes.
* Releases resources to the garbage collector. * Saves CPU time by computing less signals. * Notifies registered watchers.