title: How to apply animation in react-native?
body: <p>I want to add <code>animation</code> to this <code>search bar</code>.
  when the user touches the search bar it size decreases and again increases and gets to its default size(like animation in popups)</p>
  <p><a href="https://i.stack.imgur.com/5Cpm9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5Cpm9.png" alt="enter image description here" /></a></p>
  <p>This is my code</p>
  <pre><code>&lt;View style={{flexDirection:'row',alignSelf:'center'}}&gt;
          &lt;TextInput
             
            onChangeText={(text) =&gt; setSearch(text)}
            onFocus={()=&gt;{
              setSize('92%');
              setInterval(()=&gt;{setSize('95%')},1000)
              }}
            placeholder=&quot;Search&quot;
            style={{...styles.searchbox,width:size}}     
                               
          &gt;&lt;/TextInput&gt;   
   &lt;/View&gt; 
  </code></pre>
  <p>I am currently trying to change width..</p>