Skip to content

Instantly share code, notes, and snippets.

@Kelin2025
Created April 29, 2019 11:47
Show Gist options
  • Save Kelin2025/b3ef62c9654a146a8f03b726bca60875 to your computer and use it in GitHub Desktop.
Save Kelin2025/b3ef62c9654a146a8f03b726bca60875 to your computer and use it in GitHub Desktop.
import { interval } from 'rxjs'
import { fromObservable } from 'effector'
//emit value in sequence every 1 second
const tick = interval(1000)
const tickEvent = fromObservable(tick)
//output: 0,1,2,3,4,5....
tickEvent.watch(console.log)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment