-
Couldn't load subscription status.
- Fork 0
Open
Description
Right now switchMap is really hacky it "contextualizes" (kinda like a mutation) the behavior passed to it...
let x$ = Rex.interval(1000)
let [click$, sendClick] = Rex.createEvent()
p(click$, Rex.switchMap(() => x$), Rex.subscribe(console.log))
p(x$, Rex.subscribe(console.log))
// this won't log every second because it has been contextualized
// by the above switchMapWe can make the a "cloner" that would clone the behavior so that the original remains as it is...
let x$ = Rex.interval(1000)
let [click$, sendClick] = Rex.createEvent()
p(click$, Rex.switchMap(() => Rex.$(x$)), Rex.subscribe(console.log))
p(x$, Rex.subscribe(console.log))
// now this logs every secondI think this is kinda doable, although I haven't tried at all.
Metadata
Metadata
Assignees
Labels
No labels