Skip to content
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

Event subscriptions #29

Closed
hecrj opened this issue Oct 23, 2019 · 0 comments · Fixed by #122
Closed

Event subscriptions #29

hecrj opened this issue Oct 23, 2019 · 0 comments · Fixed by #122
Assignees
Labels
feature New feature or request help wanted Extra attention is needed
Milestone

Comments

@hecrj
Copy link
Member

hecrj commented Oct 23, 2019

Besides performing async actions on demand, most applications also need to listen to events passively. An example of this could be a WebSocket connection, where messages can come in at any time.

The idea here is to also follow Elm's footsteps. We can add a method subscriptions(&self) -> Subscription<Message> to Application and keep the subscriptions alive in the runtime.

The challenge here is designing the public API of subscriptions, so users can build their own, and subscription diffing, or basically detecting when a subscription is added/changed/removed. For this, we can take a look at the source code of Elm for inspiration.

@hecrj hecrj added the feature New feature or request label Oct 23, 2019
@hecrj hecrj added this to the 0.2.0 milestone Oct 23, 2019
@hecrj hecrj added the help wanted Extra attention is needed label Oct 23, 2019
@hecrj hecrj self-assigned this Nov 7, 2019
@hecrj hecrj modified the milestones: 0.2.0, 0.1.0 Feb 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant