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

Clock-less delay #285

Open
Kelin2025 opened this issue May 31, 2023 · 3 comments
Open

Clock-less delay #285

Kelin2025 opened this issue May 31, 2023 · 3 comments
Labels
RFC Some new feature that should be discussed

Comments

@Kelin2025
Copy link
Member

Add delay variation without clock
Should return a unit that triggers target after timeout

sample({
  clock: buttonPressed,
  source: $element,
  target: [scrollIntoViewFx, delay({ timeout: 100, target: pulseFx })]
})
@Kelin2025
Copy link
Member Author

Same for debounce & throttle

@sergeysova sergeysova added the RFC Some new feature that should be discussed label Jun 1, 2023
@sergeysova
Copy link
Contributor

What's the case?

@Kelin2025
Copy link
Member Author

See code snippet above - it's more convenient to describe several actions with different delays (such as animations) as a single sample+multiple targets, rather than writing several separate operators

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC Some new feature that should be discussed
Projects
None yet
Development

No branches or pull requests

2 participants