title: Filtering simple Flatlist
body: <p>I want to filter this simple flatlist through a search bar. How do I code it so that whatever I write something on the input text it filters the flatlist? Could you help me completing it?</p>
  
  <pre><code>import React from 'react';
  import { StyleSheet, Text, View, SafeAreaView, TextInput, TouchableOpacity, LayoutAnimation, Image, FlatList, ScrollView } from 'react-native';
  import Icon from 'react-native-vector-icons/Ionicons';
  import {ListItem, SearchBar} from 'react-native-elements';
  
  export default class HomeScreen extends React.Component{
     render() {
         return (
          &lt;View style={styles.container}&gt;
              &lt;View style={styles.header}&gt;
                  &lt;Text style={styles.headerTitle}&gt;Home&lt;/Text&gt;
              &lt;/View&gt;
              &lt;View style={styles.container1}&gt;
                  &lt;Icon name={"ios-search"} style={styles.icon}/&gt;       
                  &lt;TextInput style={styles.inputBox}
                            underlineColorAndroid='rgba(0,0,0,0)' 
                            placeholder="Procura aqui"                                                                                                                                                                                                                                                                                              
                            placeholderTextColor = "white"
                            selectionColor="black"
                            keyboardType="default"              
                            /&gt;
               &lt;/View&gt; 
               &lt;View style={styles.flatlist}&gt;
                &lt;FlatList
                  data = {[
                    {key:'Tiago'},
                    {key:'Ricardo'},
                    {key:'Beatriz'},
                    {key:'Miguel'},
                    {key:'Simão'},
                    {key:'David'}
                  ]}
                  renderItem={({item}) =&gt; &lt;Text style={styles.item}&gt;{item.key}&lt;/Text&gt;}
                /&gt;
               &lt;/View&gt;
      &lt;/View&gt;           
      );
  }
  }
  </code></pre>