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

Should EventStream.delay accept the event arg by-name? #138

Open
raquo opened this issue Dec 24, 2024 · 0 comments
Open

Should EventStream.delay accept the event arg by-name? #138

raquo opened this issue Dec 24, 2024 · 0 comments

Comments

@raquo
Copy link
Owner

raquo commented Dec 24, 2024

  • EventStream.delay(100, ev) should not evaluate ev until after 100ms have passed.
  • ev should be re-evaluated every time the stream starts, unless emitOnce = true is set (then subsequent starts don't emit anything, same as now)

This would make EventStream.delay(ms, ev) behave the same as EventStream.delay(ms).mapTo(ev) rather than EventStream(ev).delay(ms).

(Note: EventStream.apply is the future alias to EventStream.fromValue, not yet available)

I don't know, maybe we should even remove the ability to pass ev to EventStream.delay at all, to force users to clarify their intent. With the new apply alias, both options will become quite ergonomic to write.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant