This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-01-06
Channels
- # architecture (8)
- # aws (2)
- # beginners (156)
- # boot (163)
- # cider (22)
- # cljs-dev (2)
- # cljsrn (11)
- # clojars (6)
- # clojure (328)
- # clojure-austin (7)
- # clojure-dusseldorf (10)
- # clojure-italy (2)
- # clojure-russia (19)
- # clojure-spec (178)
- # clojure-uk (86)
- # clojurescript (81)
- # cursive (17)
- # datomic (33)
- # funcool (40)
- # hoplon (8)
- # jobs (5)
- # klipse (13)
- # leiningen (1)
- # luminus (21)
- # off-topic (140)
- # om (49)
- # om-next (4)
- # onyx (29)
- # planck (5)
- # protorepl (2)
- # re-frame (58)
- # reagent (2)
- # remote-jobs (4)
- # ring-swagger (16)
- # testing (1)
- # untangled (26)
- # yada (27)
@niwinz is there some utility or so in beicon that helps me turn a callback based API into a stream?
Could probably whip up something myself just wondered if there’s some utility for that 🙂
I guess a debouncer mixin might be better since I can reuse that easier in other components
Hm. Something with my get-completions!
function is still wrong, Can’t get the StartPlacesAutocompletion
. Seems when I merge one ended stream with another one it ends it too? Or something like that? 😄
Ah! — rx/subject
!
Hm, still doesn’t quite work...
@martinklepsch (rx/map (fn [x] (get-completions! serv x)))
I tried mapcat
yeah, I think the culprit is somewhere in that get-completions
fn
Also tried rx/end
instead of rx/push!
The objective is to return a stream with one item
uh, weird. I tried (end! subject thing)
and thought it would put thing
on the stream and end it.
There was no exception for the (end! subject thing)
right but shouldn’t it cause an error then, calling a function with wrong arity?
maybe I’m remembering wrongly what I did, will re-check later
oh, ok, that’s rough 😄
never consciously ran into that
@niwinz generally would that be the approach you would take or would you use component lifecycle, decouple debounce & actual action, .... ?
I guess question is if you think this is a good area for RX over other solutions
I’m also tending towards using component lifecycle now mostly because I can make the debounce stuff separate to the action I’m doing after debounce
(which is coupled here and not really nice I’d say)