Hi,

Thanks for cloact, its great !

I was comparing the BMI Calculator from hoplon and cloact, and could see that 
the hoplon approach was more simpler for one primary reason - their use of FRP 
(javelin) to tie in the model pieces. 

So when a user change occurs, instead of calling change-bmi, the hoplon example 
simply changes the weight/height. This causes the respective bmi to change, 
which causes the ui to rerender.

Cloact currently uses an atom to propogate state changes, is it possible to 
swap it with the javelin piece ?

Thanks,
Murtaza
  


On Thursday, December 19, 2013 11:31:04 PM UTC+5:30, Dan Holmsand wrote:
> Yes, React is really great (and it actually seems to fit ClojureScript with 
> its immutable datastructures better than JS...). 
> 
> 
> 
> /dan
> 
> 
> 
> On Thursday, December 19, 2013 4:49:32 PM UTC+1, David Nolen wrote:
> 
> > Great to see the growing interest in React :)
> 
> > 
> 
> > 
> 
> > It's also worth giving Om a look: http://github.com/swannodette/om. The 
> > implementation is very simple - the big idea is that we might as well 
> > always re-render from the root. Then the *entire* UI can represented with 
> > EDN and is always snapshotable. It's really, really fast.
> 
> > 
> 
> > 
> 
> > 
> 
> > I've been in touch with the React devs and they seem open to 
> > making/accepting patches that make React nicer to use from CLJS.
> 
> > 
> 
> > 
> 
> > 
> 
> > David
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > On Thu, Dec 19, 2013 at 9:39 AM, Dan Holmsand <holm...@gmail.com> wrote:
> 
> > 
> 
> > 
> 
> > It seems to be quite popular these days to try to fit Facebook's React 
> > library into ClojureScript, so I thought I'd have a go as well...
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > The result is here:
> 
> > 
> 
> > 
> 
> > 
> 
> > https://github.com/holmsand/cloact
> 
> > 
> 
> > 
> 
> > 
> 
> > Cloact uses plain cljs functions to define React components, and a Hiccup-y 
> > syntax for stringing them together.
> 
> > 
> 
> > 
> 
> > 
> 
> > Performance seems to be quite good, especially in 
> > advanced-compilation-mode. Cloact uses shouldComponentUpdate to avoid any 
> > unnecessary rendering, and so avoids the cost of converting from cljs 
> > vectors and maps a lot of the time.
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > Cloact comes with a couple of silly examples:
> 
> > 
> 
> > 
> 
> > 
> 
> > https://github.com/holmsand/cloact/blob/master/examples/simple/src/simpleexample.cljs
> 
> > 
> 
> > 
> 
> > 
> 
> > (a fancy clock that even can change color) and
> 
> > 
> 
> > 
> 
> > 
> 
> > https://github.com/holmsand/cloact/blob/master/examples/todomvc/src/todomvc.cljs
> 
> > 
> 
> > 
> 
> > 
> 
> > (the obligatory todomvc implementation).
> 
> > 
> 
> > 
> 
> > 
> 
> > Enjoy,
> 
> > 
> 
> > 
> 
> > 
> 
> > /dan
> 
> > 
> 
> > 
> 
> > 
> 
> > --
> 
> > 
> 
> > Note that posts from new members are moderated - please be patient with 
> > your first post.
> 
> > 
> 
> > ---
> 
> > 
> 
> > You received this message because you are subscribed to the Google Groups 
> > "ClojureScript" group.
> 
> > 
> 
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to clojurescrip...@googlegroups.com.
> 
> > 
> 
> > To post to this group, send email to clojur...@googlegroups.com.
> 
> > 
> 
> > Visit this group at http://groups.google.com/group/clojurescript.

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to