This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-09-06
Channels
- # 100-days-of-code (15)
- # beginners (32)
- # calva (2)
- # cider (37)
- # clara (1)
- # cljs-dev (47)
- # clojure (177)
- # clojure-boston (1)
- # clojure-dev (2)
- # clojure-germany (1)
- # clojure-greece (5)
- # clojure-italy (13)
- # clojure-nl (2)
- # clojure-sanfrancisco (1)
- # clojure-uk (72)
- # clojurescript (46)
- # cursive (20)
- # datascript (7)
- # datomic (14)
- # devcards (6)
- # docker (1)
- # duct (1)
- # emacs (1)
- # figwheel (3)
- # figwheel-main (151)
- # graphql (2)
- # hyperfiddle (1)
- # interop (3)
- # jobs (3)
- # lumo (2)
- # off-topic (21)
- # pedestal (1)
- # re-frame (9)
- # reagent (25)
- # shadow-cljs (57)
- # slack-help (4)
- # specter (21)
- # tools-deps (53)
- # vim (2)
Whoa I never saw that but kind of ended up evolving that same structure
The db layer is important for things common to handlers subs and events
I think that was what I was missing
Before I started adding them in
Anyone have a good solution to debounce and match requests? Usecase is autocomplete, where the user might type faster than the replies come in. So should send requests only after some delay that's a bit more than typing speed, and when replies come back should not override with older data. Bonus points if the whole tcp connections for stale requests get killed.
I found some solutions for debouncing, https://github.com/Day8/re-frame-http-fx/issues/3 discussing aborts, and none that readily match responses to requests (though this wouldn't be too difficult to implement). Though I wonder if it's possible to type so quickly, that there are multiple onChange events resolved at same time and they are not resolved FIFO?
the underlying closure http lib (or native browser http xhrio) both support cancellation. i always write my own :http
effect that can be configured via {:http {:cancellable? true}}
. you can easily wire up something to store in-flight requests, then check against those in-flight for an opportunity to cancel if another event comes along that would supersede the results
@tomi.hukkalainen_slac for debounce, I like this one: https://github.com/7theta/re-frame-fx/blob/master/README.md