Guest User

Untitled

a guest
Dec 13th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. const Clock = rxify((initialProps, prop$) => {
  2. return prop$
  3. .pipe(
  4. filter(pd => pd.differences.includes('running')),
  5. map(pd => pd.next.running),
  6. switchMap(running => running ? interval(0, 1000) : empty()),
  7. startWith(1),
  8. map(_ => (<span className="time">{new Date().toLocaleTimeString()}</span>))
  9. )
  10. });
Add Comment
Please, Sign In to add comment