Fork me on GitHub

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


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


simple example


Wow I was able to load that in


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


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


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.


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


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


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


@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?


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


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


@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)


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


@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)?


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


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


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


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


oh ok, thanks simple_smile


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


yes, you could do that