<?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: Alberto Peral</title>
    <description>The latest articles on DEV Community by Alberto Peral (@albertop).</description>
    <link>https://dev.to/albertop</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%2F774160%2F2a968c75-63fc-4a42-98a1-793f23701cc4.jpeg</url>
      <title>DEV Community: Alberto Peral</title>
      <link>https://dev.to/albertop</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/albertop"/>
    <language>en</language>
    <item>
      <title>How to persist countdown in background react native expo</title>
      <dc:creator>Alberto Peral</dc:creator>
      <pubDate>Tue, 14 Dec 2021 06:51:06 +0000</pubDate>
      <link>https://dev.to/albertop/how-to-persist-countdown-in-background-react-native-expo-23bi</link>
      <guid>https://dev.to/albertop/how-to-persist-countdown-in-background-react-native-expo-23bi</guid>
      <description>&lt;p&gt;I've tried use a countdown in background in react native expo, i use webview:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;WebView
        onMessage={() =&amp;gt; {

            if (props.initialHour &amp;gt;= finishHour) {
                props.setMinutes(null);
                props.stopSound();
            }
        }}
        source={{
            html: `&amp;lt;script&amp;gt;
          setInterval(()=&amp;gt;{window.ReactNativeWebView.postMessage("");}, ${props.interval})
          &amp;lt;/script&amp;gt;`,
        }}
    /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;but only persist interval 5min in background and i've tried setTimeout too and the same results.&lt;/p&gt;

&lt;p&gt;How can i do it? without using expo eject&lt;/p&gt;

&lt;p&gt;Please help me :( and thank you!&lt;/p&gt;

</description>
      <category>react</category>
    </item>
  </channel>
</rss>
