> But it would probably be better to just pass (:relevant-submap @my-atom) to a
> sub-component. The subcomponent will only be re-rendered when its arguments
> (i.e the params map and possible children) changes.
Ahh, gotcha. Of course, thank you!
> Also, React is fast enough that a few re-rend
On 11 jan 2014, at 18:51, Peter Taoussanis wrote:
>
> Am looking at this from a performance point of view. You're marking
> components as dirty when there's any change in an atom being deref'ed by the
> component, right?
>
> But I'm guessing it's quite common for a component to be dealing with
> Quite another thing is if it is a good idea to do that :-) If possible, I'd
> say it is better to keep state that belongs together in a single atom.
Am looking at this from a performance point of view. You're marking components
as dirty when there's any change in an atom being deref'ed by the
Thanks a lot Peter!
Btw, there is already code that comes from Reflex in Cloact (even if it is
mangled quite a bit by now). Very undocumented, and probably a very poor api,
though... See ratom.clj/.cljs. There is for example a run! macro that will
execute its body every time a deref'ed atom is
Hi Dan,
This seems like a really smart approach to me. I've been playing with a
number of ways of structuring a large Cljs application recently - and the
way Cloact cooperates with atom derefs is pretty inspired. It's flexible,
it's fast, it's natural - and it makes transition from a non-React
On Friday, January 10, 2014 5:23:19 PM UTC+1, David Nolen wrote:
> Looks very nice :)
Thanks!
/dan
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are
Looks very nice :)
On Friday, January 10, 2014, Dan Holmsand wrote:
> Cloact is a minimalistic interface between ClojureScript and React.js,
> that now has a proper introduction, some documentation and a few examples
> here:
>
> http://holmsand.github.io/cloact/
>
> Project page and installation
Cloact is a minimalistic interface between ClojureScript and React.js, that now
has a proper introduction, some documentation and a few examples here:
http://holmsand.github.io/cloact/
Project page and installation instructions are here:
https://github.com/holmsand/cloact
Enjoy,
/dan
--
--