On Tuesday, August 11, 2015 at 2:05:12 AM UTC-5, Eduard Bondarenko wrote:
> I think you don't need to nest #js, only one on start. Am I correct?
You are incorrect. In fact, there needs to be one more #js for the vector to
make it a js array. Using threading can clean this up a bit too and make it
read more like the original js:
(defn home-did-mount []
(-> (js/$ js/document)
(.ready (fn []
(-> (js/$ "#example")
(.dataTable #js{:columnDefs
#js[#js{:orderable false
:targets 0}]}))))))
As for whether this is the best way to use dataTable with reagent, that I am
not sure about. The hardcoded "#example" is suspicious, probably better to use
a react ref or getDOMNode() instead if reagent exposes this.
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.