Fork me on GitHub
#re-frame
<
2016-04-06
>
pepe06:04:50

@ckarlsen: and may I ask you, if you can spare a gist of how you are using it, please? That would be awesome

escherize07:04:44

that Victory library looks awesome. I'd like to know how to use that too, @ckarlsen

ckarlsen11:04:54

simple example

escherize12:04:26

Wow I was able to load that in http://cljsfiddle.com

escherize13:04:19

thanks so much @ckarlsen: I've never actually seen adapt-react-class used in anything but re-natal before!! Quite easy to use :O

mccraigmccraig14:04:40

what do people use for communication between components at a distance ? i've got a simple core.async pubsub mechanism https://www.refheap.com/df4ee52e0604006633a5ad182 - are there other solutions in use ?

lsnape16:04:50

Hey all, I’m interested to know how people are writing async request handlers in re-frame. I’ve inherited a project that makes requests in a handler inside a go block and then dispatches an event once the response returned. Seems a bit of an anti-pattern because the first event doesn’t mutate the app state, it just fires the request off and waits for the response.

lsnape16:04:36

I’m fairly new to re-frame so sorry if this has been asked before simple_smile

lsnape16:04:57

Okay I’ve scrolled up a bit and found the ‘Talking to Servers’ page. Seems like how it’s done. Np

nberger17:04:35

Yeah, I use to do it that way. And it's not that the first handler doesn't return an updated db: it can update some :loading? flag for example, apart from firing the request

nidu17:04:42

@mccraigmccraig: Could you please explain what you mean? Is it communication between components on one level of hierarchy or between far levels of one hierarchical path?

tom18:04:40

Quasi off topic: How do you guys work with a designer/CSS-writing workers when using re-frame? Any cautions or problems?

danielcompton19:04:01

@mccraigmccraig: generally you don’t want components to be communicating, they should mostly be just depending on app-db

mccraigmccraig19:04:29

@danielcompton: i've got a couple of cases where they need to... in the one i'm looking at atm there's a textfield which was backed by app-db, but perf was bad on crappy mobiles so i'm trying out backing it with a reagent-atom, but this requires coordinating with app-db when things happen far away (such as navigation)

mccraigmccraig20:04:15

@nidu the two cases i've come across were several levels apart in hierarchy and in one case required multiple responders for an event

nberger20:04:12

@mccraigmccraig: the bad perf is on any optimization level (:none, :simple, :advanced)? do you have any re-frame middleware enabled (debug can be particularly heavy)?

mccraigmccraig20:04:57

@nberger :simple and no middleware outside of dev-mode (and the perf problem is in production-mode)

nberger20:04:02

ok @mccraigmccraig, would be nice to know where's that bottleneck, just wanted to discard options simple_smile

nberger20:04:38

btw, what's dev-mode and production-mode? I mean, is that actual middleware?

mccraigmccraig20:04:29

no, that's just my concept configured from a goog-define ... in dev-mode i do schema checking and logging in middleware, in production neither

nberger20:04:51

oh ok, thanks simple_smile

mccraigmccraig20:04:00

hmm is it possible to run the chrome devtools profiler on cljs ? that would be useful

nberger20:04:38

yes, you could do that