cool work,
Just wondering, why in todomvc you rely so heavily onto #js literals, and prefer dsl-like syntax (dom/...) instead of some declarative markup like hiccup? Is it because of performance reasons?
Thanks!
I've been playing around with some basics. I'm still a relative n00b when it comes to functional programming, and I've never looked at React before.
Very cool stuff.
I managed to get Om+React to display a list of items that are sorted by a given key, and I have a content-editable span which updates the state of the owner with new value of that key for a given item, and voila! the list item moves to the correct position. (as expected)
Now here's the tricky part...
I want to implement a drag-list, where I can drag-drop items into a new position, and update the key based on the new position. I have that algorithm working in a different project (using goog.DragListGroup) , but React does not like you to manipulate the DOM outside it's knowledge.
I found this :
https://groups.google.com/forum/#!searchin/reactjs/sortable/reactjs/mHfBGI3Qwz4/rXSr-1QUcKwJ
which lead to
http://jsfiddle.net/LQxy7/
Unfortunately, I can't get this to work with Om. I am having trouble navigating the data structures.
How are "props" created/accessed? I followed the TodoMVC example, but that seems to be using "state", which I am given to understand should be kept as high in the hierarchy as possible (per the React recommendations). I tried something like (:value (om/get-props this)) from within IRender, but that doesn't work. Also : (om/get-props this [:items] ) (following the idiom established by get-state.
I'm probably missing something obvious, so I thought I'd pop in here to see if there's someone who can point me in the right direction.
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to---
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hi Guys,
So... I'm trying to compile a cljs project with OM.
As in instructed above I've:
cloned the repo:
git clone https://github.com/swannodette/om.git
Installed:
lein install
(Output shown below)
Retrieving org/clojure/clojurescript/0.0-2138/clojurescript-0.0-2138.pom from central
Retrieving org/clojure/core.async/0.1.267.0-0d7780-alpha/core.async-0.1.267.0-0d7780-alpha.pom from central
Retrieving com/facebook/react/0.8.0.1/react-0.8.0.1.pom from clojars
Retrieving org/clojure/core.async/0.1.267.0-0d7780-alpha/core.async-0.1.267.0-0d7780-alpha.jar from central
Retrieving org/clojure/clojurescript/0.0-2138/clojurescript-0.0-2138.jar from central
Retrieving com/facebook/react/0.8.0.1/react-0.8.0.1.jar from clojars
Created G:\om\target\om-0.1.6-SNAPSHOT.jar
I then added to my projects cljs a dependency of [om "0.1.6"]
I still get the following error on compilation:
Could not find artifact om:om:jar:0.1.6 in central (http://repo1.maven.org/maven2/)
Could not find artifact om:om:jar:0.1.6 in clojars (https://clojars.org/repo/)
I'm clearly being terribly stupid.
Any suggestions?
--
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.