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

run() scope #48

Open
DrSensor opened this issue Jan 4, 2023 · 0 comments
Open

run() scope #48

DrSensor opened this issue Jan 4, 2023 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@DrSensor
Copy link
Owner

DrSensor commented Jan 4, 2023

run(() => {
  const pid = seInterval(() => {
    console.log("print every 1s")
  }, 1 * s)
  return () => clearInterval(pid)
}, when?: string)

Those that are wrapped in run() scope will run every time (not just once) current <render-scope> is in view and stop (call returned function) when out of view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant