This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-11-03
Channels
- # beginners (167)
- # boot (22)
- # chestnut (3)
- # cider (9)
- # clojure (107)
- # clojure-berlin (1)
- # clojure-greece (3)
- # clojure-italy (6)
- # clojure-losangeles (6)
- # clojure-russia (8)
- # clojure-spec (71)
- # clojure-uk (42)
- # clojurescript (186)
- # community-development (1)
- # core-async (12)
- # core-typed (1)
- # css (15)
- # cursive (29)
- # data-science (11)
- # datomic (8)
- # defnpodcast (28)
- # duct (2)
- # fulcro (169)
- # graphql (6)
- # hoplon (3)
- # jobs-discuss (1)
- # kekkonen (5)
- # leiningen (11)
- # lumo (7)
- # off-topic (14)
- # om (1)
- # other-languages (14)
- # portkey (7)
- # re-frame (27)
- # reagent (14)
- # remote-jobs (1)
- # ring-swagger (5)
- # rum (15)
- # shadow-cljs (52)
- # spacemacs (59)
- # specter (78)
- # test-check (3)
- # vim (9)
- # yada (23)
Hi, I’m looking for advice on how to integrate a persistent websocket connection with re-frame. This is the first re-frame code that I write, so I (perhaps naively?) created a global “socket” object that connects, registers handlers and so on. Are there better approaches? What about figwheel and code reloading? I do want a defonce somewhere to avoid re-connecting on every code reload, ye?
hello everyone, how do you manage event handlers chaining ? for instance, I want my application to do some xhrs sequentially, one by one and also I want actual event handlers to stay loosely coupled i.e. no things like
{:handler #(rf/dispatch [:next-step])}
. Is there a part of re-frame api that allows these kind of behavior or should I implement it myself ?I use re-frame-async-flow-fx
you can declare a kind of chain or pattern, so subsequent events dispatch after having 'seen' e.g. a success or failure
I think there's definitely room for improvement though, @mikethompson mentioned CEP the other day; some sort of pattern matching/state machine/automata could be interesting here.
Hey @zallin you could set some db-state from the success/failure handlers of your events and dispatch a general event which decides (call a multimethod) via the db-state what to do. But that maybe doing manually what @danieleneal suggested.
yep agree @abp that's probably the best way to start, async-flow-fx is more an option to be assessed to see if it's appropriate
@danieleneal CEP ? what is it ?
this is the library mike mentioned
that could well be overkill though 😄
Guys, Can someone help me about using react-native-camera external module on re-natal app ? Just tell me, how can I run it within it ?
I'm starting to play around with using taoensso/timbre for profiling ... is there a good place to wrap the outer (profile {} ...)
call to catch component activity or am I thinking about this all wrong? My goal is to get timings on some (possibly?) expensive render and component-did-mount work (that last because I'm using D3).
@rgm I'm not really answering your question about profiling, sorry, but be sure to read (links at the bottom on D3): https://github.com/Day8/re-frame/blob/master/docs/Using-Stateful-JS-Components.md
re-frame-trace
may be useful for timings, maybe. Still developing
But no help for component-did-mount
timings
it's nbd to (profile {} (p ::my-tag (do-the-d3-work ...)
at its callsite in component-did-mount
and just get that timing, but I was just wondering if there's a good strategic place to do that much further out so I can just leave the timbre probes in place and toggle them on/off with one (profile {} ...
).