Clear previous children on re-render
This commit is contained in:
parent
93ed84cf69
commit
31e953daf2
@ -59,6 +59,7 @@
|
|||||||
$comments)))
|
$comments)))
|
||||||
|
|
||||||
(defn render-items [items]
|
(defn render-items [items]
|
||||||
|
(dom/removeChildren (dom/getElement "storiesContainer"))
|
||||||
(let [stories (filter #(= "story" (% "type")) items)
|
(let [stories (filter #(= "story" (% "type")) items)
|
||||||
$stories (clj->js (map story-dom stories))
|
$stories (clj->js (map story-dom stories))
|
||||||
$storiesContainer (dom/getElement "storiesContainer")]
|
$storiesContainer (dom/getElement "storiesContainer")]
|
||||||
|
Loading…
Reference in New Issue
Block a user