I am fairly new to cljs and very new to Om.Next so this question is 
probably trivial to answer. 


I would like to do something equivalent to Reagent form-3 components, which 
enable me to define some vars I can reuse in all lifecycle functions of 
specific instantiations of a component.


Basically my question is how do I construct something equivalent to the let in 
the Reagent code snippet below? I can't seem to figure out how to do this 
properly using Om's defui macro.


A simple example would be to generate ids I can attach to specific elements 
in my component to streamline access to them in all lifecycle functions of 
a specific instance of my component via gdom/getElement.


(defn my-component
  [x y z]  
  (let [id (gensym "my-component-")]  ;; <-- how to do this in Om?
     (reagent/create-class                 
       {:component-did-mount (...)
        :component-will-mount (...)          
        :reagent-render
         (fn [x y z] (...))))


I assume an equivalent approach is possible in Om.Next, but please let me 
know if I am somehow committing a cardinal sin using this approach.


I have also asked this question on stackoverflow 
<https://stackoverflow.com/q/47181093/2148672>.

-- 
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 https://groups.google.com/group/clojurescript.

Reply via email to