React 15 has createReactFragment through an addon, which is what you need

(defn react-fragment [react-key & xs]
  (js/reactCreateFragment (clj->js {react-key (map reagent.core/as-element 
xs)})))



(def posts [{:db/id 1 :post/title "one" :post/date #inst "2017-12-01"}
            {:db/id 1 :post/title "one" :post/date #inst "2017-12-02"}
            {:db/id 1 :post/title "one" :post/date #inst "2017-12-03"}])

[:fieldset [:legend "dt/dd pairs"]
 [:dl
  (->> posts
       (map (fn [post]
              (react-fragment (:db/id post)
                              [:dt (some-> (:post/date post) 
.toLocaleDateString)]
                              [:dd (:post/title post)]))))]]

-- 
You received this message because you are subscribed to the Google Groups 
"Reagent-Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reagent-project+unsubscr...@googlegroups.com.
To post to this group, send email to reagent-project@googlegroups.com.
Visit this group at https://groups.google.com/group/reagent-project.
For more options, visit https://groups.google.com/d/optout.

Reply via email to