You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Need a stream that emits values at an interval when it's active. it's possible to emulate with a DIY EventBus hack, but we should have a proper way to do this.
For API design, bare minimum is to emit Unit-s. But it might be quite cheap and useful to emit an index-like number instead. But then we need an option to reset the number on deactivation. Maybe make the counter a separate method.
Also, consider putting a limit on number of emitted values? But that will be more useful as a take() or until(), and well that's more of a #23 thing, so maybe another day.
The text was updated successfully, but these errors were encountered:
Until this is implemented, could you post an example of the "EventBus hack"?
I finally decided to take the plunge and rewrite one of my projects with Laminar, but the first thing I need to do is trigger updates based on a clock tick. Basically-
val diffBus = new EventBus[Int]
dom.window.setInterval(() => +1 --> diffBus, 10000)
Seems like the simplest version of EventStream.periodic can be included in Airstream with caveats, as it's missing from the current docs almost completely. What do you think @raquo ?
Need a stream that emits values at an interval when it's active. it's possible to emulate with a DIY EventBus hack, but we should have a proper way to do this.
For API design, bare minimum is to emit Unit-s. But it might be quite cheap and useful to emit an index-like number instead. But then we need an option to reset the number on deactivation. Maybe make the counter a separate method.
Also, consider putting a limit on number of emitted values? But that will be more useful as a take() or until(), and well that's more of a #23 thing, so maybe another day.
The text was updated successfully, but these errors were encountered: