[ClojureScript] Re: MVI/virtual-dom improvement over React/Om?

2014-11-08 Thread Robin Heggelund Hansen
Thanks for the link! Very interesting read, I might play around with this later :) -- 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

[ClojureScript] Re: javascript to clojurescript transpiler

2014-11-08 Thread Thomas Heller
On Friday, November 7, 2014 12:24:36 AM UTC+1, Tom Connors wrote: I've got a project right now that uses javascript on the client and server and I'd love to be able to migrate to clojurescript. I'm wondering whether anyone is aware of any software that will transform the js into

[ClojureScript] wrapper component causing re-rendering of all components rendered from a list

2014-11-08 Thread Paul Cowan
I am playing about with creating a wrapper component that I can add some simple animations to. I know there is ominate but this is just for my own tinkering. I am rendering a number of dynamic components from a list like this: (map #(om/build clip-view % {:key :id}) clips) When I render the

[ClojureScript] Re: wrapper component causing re-rendering of all components rendered from a list

2014-11-08 Thread Colin Yates
Might be a red-herring, but here goes: Is it because animate is returning an anonymous function which is a no-no (as anonymous functions instances are not equal)? What happens if you remove the (fn [..]) from animate so animate is (defn animate [...] (reify ...))? On Saturday, 8 November 2014

[ClojureScript] om (0.8alpha1) resolved cursor != contents of cursor

2014-11-08 Thread Colin Yates
Hi, I have found a bug, but it may well be (almost certainly is) in my understanding ;). tldr; I decorate something from app-state and store as component-state. In rendering I see the decorated thing but in on-click when I resolve the cursor I see the undecorated thing. I have a hierarchy in

Re: [ClojureScript] Re: wrapper component causing re-rendering of all components rendered from a list

2014-11-08 Thread Paul Cowan
But then it is no longer a func that can be passed to om/build https://github.com/swannodette/om/wiki/Documentation#build. The func will just get executed unless I misunderstood you? Cheers Paul Cowan Cutting-Edge Solutions (Scotland) blog: http://thesoftwaresimpleton.com/ website:

Re: [ClojureScript] Re: wrapper component causing re-rendering of all components rendered from a list

2014-11-08 Thread Colin Yates
Ignore my last post - I was being a numpty (serves me right for trying to work whilst looking after 4 kids!). Yes, you are right, om wants you to pass the var itself. This is all about composing components in om, which I have run into myself and don't have a particularly elegant answer. I did

Re: [ClojureScript] Re: om (0.8alpha1) resolved cursor != contents of cursor

2014-11-08 Thread Colin Yates
James, thank you. That does help. My mental model of app-state being pure domain and view hierarchies effectively projecting their own structures is the thing to challenge. The approach, if I may generalise is by all means project off app-state but keep it alongside (e.g. through opts as you

Re: [ClojureScript] Re: om (0.8alpha1) resolved cursor != contents of cursor

2014-11-08 Thread jack james
I try to avoid these types of generalizations. There's nothing inherently wrong with decorating a cursor, and it will work fine in many scenarios. But when you need app-state data + some other data in an event handler, you'll need a different approach, because deref will only return the

Re: [ClojureScript] Re: om (0.8alpha1) resolved cursor != contents of cursor

2014-11-08 Thread Colin Yates
I see. Thanks again. On Saturday, 8 November 2014 16:56:09 UTC, jack james wrote: I try to avoid these types of generalizations. There's nothing inherently wrong with decorating a cursor, and it will work fine in many scenarios. But when you need app-state data + some other data in an

[ClojureScript] Why does the following program terminates ?

2014-11-08 Thread Roger Gilliar
This is a simple node.js based program using core.async. The question is: Why does the program terminate, although there is this while true loop inside the go macro in main ? (ns node-hello-world.core (:require-macros [cljs.core.async.macros :refer [go]]) (:require [cljs.core.async :as

[ClojureScript] Om wrapping Flot example

2014-11-08 Thread Ken Restivo
Just a small thing, not really worth of a git repo, but... A reusable OM component to wrap a Flot chart object: (defn flot node-name is the id for the DOM node of the flot chart chart-options is a clojure nested map of options for flot (see flot docs) data is clojure vector of vectors or