<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: zendevil</title>
    <description>The latest articles on DEV Community by zendevil (@zendevil).</description>
    <link>https://dev.to/zendevil</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F587669%2F21eb13ba-c0ee-465f-9203-26610ef85f49.png</url>
      <title>DEV Community: zendevil</title>
      <link>https://dev.to/zendevil</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zendevil"/>
    <language>en</language>
    <item>
      <title>Images disappear upon scrolling flatlist </title>
      <dc:creator>zendevil</dc:creator>
      <pubDate>Sun, 28 Feb 2021 05:10:14 +0000</pubDate>
      <link>https://dev.to/zendevil/images-disappear-upon-scrolling-flatlist-5298</link>
      <guid>https://dev.to/zendevil/images-disappear-upon-scrolling-flatlist-5298</guid>
      <description>&lt;p&gt;I'm using clojurescript for react native. The code essentially compiles to javascript. I have a flat-list like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[flat-list {:refreshControl
                  (r/as-element
                   [refresh-control {:refreshing @(subscribe [:refreshing])
                                     :onRefresh #(dispatch [:load-videos])}])
                  :data (reverse @(subscribe [:videos]))
                  :renderItem (fn [item]
                                (r/as-element
                                 [video-press (get (js-&amp;gt;clj item) "item")
                                                        navigation]))
                  :keyExtractor (fn [item] (str (random-uuid)))}]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;where video-press is the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(defn video-press [video navigation]
  (js/console.log "video is" video)
  (js/console.log "thumbnail is " (get video "thumbnail"))
  [pressable {:key (random-uuid)
              :style {:borderWidth 1
                      :borderColor :gray
                      :height 300
                      :margin 1
                      :marginTop 3
                      :marginBottom 3
                      }
              :onPress #(doall
                         (.navigate navigation :Video)
                         (dispatch [:show-info video]))}
   [image {:source {:uri (str "https://d211alragp6msc.cloudfront.net/"
                              ;;"https://d1i5nt38vlltuu.cloudfront.net/"
                              (get video "thumbnail"))}
           #_{:uri (get video "photo")} :style {:height "80%" :width "100%"
                                                :resizeMode :contain}}]
   [view {:style {:flex 1 :flexDirection :column}}
    [text {:style {:fontWeight :bold}} (get video "title")]
    [view {:style {:flex 1 :flexDirection :row}}
     [image {:source {:uri (get video "photo")}
             :style
             {:height 40
              :width 40
              :borderRadius 1000}}]
     [text {:style {:margin 5}} (get video "name")]]]
   #_[:&amp;gt; Text {:style {:fontSize 20}} (get video "name")]
   #_[:&amp;gt; Text (get video "description")]]
  )
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However, upon scrolling the flatlist, I’m seeing the images disappear. Moreover, the images take a long time to show as well. How do I fix this?&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
