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

Operator proposal: idle #213

Open
igorkamyshev opened this issue Aug 2, 2022 · 1 comment
Open

Operator proposal: idle #213

igorkamyshev opened this issue Aug 2, 2022 · 1 comment
Labels
RFC Some new feature that should be discussed

Comments

@igorkamyshev
Copy link
Member

igorkamyshev commented Aug 2, 2022

Some operations in our application have lower priority than others, I purpose to add an operator to postpone event propagation until browser is idle.

const $fitler = restore(fitlerChanged, null)

const $filteredItems = createStore([])

sample({
  clock: idle({ clock: filterChanged }),
  source: $items,
  fn: doSmth,
  target: $filteredItems
})

In this case, we can change $filter value immediate and respond to user input, but filtering of a large list will be delayed.

@igorkamyshev igorkamyshev added the RFC Some new feature that should be discussed label Aug 2, 2022
@sergeysova
Copy link
Member

What about case when no clock is provided?
For example, plan event triggering until browser is idle.

const readyToCompute = idle();

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