Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Clock = rxify((initialProps, prop$) => {
- return prop$
- .pipe(
- filter(pd => pd.differences.includes('running')),
- map(pd => pd.next.running),
- switchMap(running => running ? interval(0, 1000) : empty()),
- startWith(1),
- map(_ => (<span className="time">{new Date().toLocaleTimeString()}</span>))
- )
- });
Add Comment
Please, Sign In to add comment