Clear previous children on re-render

This commit is contained in:
Jeremy Dormitzer 2018-01-12 17:15:13 -05:00
parent 93ed84cf69
commit 31e953daf2
No known key found for this signature in database
GPG Key ID: 04F17C0F5A32C320

View File

@ -59,6 +59,7 @@
$comments)))
(defn render-items [items]
(dom/removeChildren (dom/getElement "storiesContainer"))
(let [stories (filter #(= "story" (% "type")) items)
$stories (clj->js (map story-dom stories))
$storiesContainer (dom/getElement "storiesContainer")]