title: Unable to render flat list while searching
body: <p>I have a list view in which list item component is designed by me.
  If I render listItem alone it is working fine but after integrating ith with SearchBar I am not able to render them even though am able to get object matching a particular search</p>
  
  <h3>SearchListItem</h3>
  
  <pre><code>import React from 'react';
  import {Image, Text, View} from "react-native";
  
  
  export default class SearchListItem extends React.Component
  {
  
      render()
      {
          return (
              &lt;View style={{flexDirection: 'row'}}&gt;
                  &lt;Image source={{uri: this.props.src}}
                         style={{width: 50, height: 50, backgroundColor: '#fff'}} /&gt;
  
                  &lt;Text style={{height: 50, lineHeight: 50, width: '100%',textAlign: 'center', flex:1, backgroundColor: '#FFF'}}&gt;{this.props.text}&lt;/Text&gt;
              &lt;/View&gt;
          )
      }
  }
  </code></pre>
  
  <h2>App.js</h2>
  
  <pre><code>import React from 'react';
  import {FlatList, StyleSheet, Text, TextInput, View} from 'react-native';
  import SearchListItem from "./components/SearchListItem";
  import { SearchBar } from 'react-native-elements';
  import { includes } from 'lodash';
  
  export default class App extends React.Component {
  
  
      constructor(props)
      {
          super(props);
          this.all_categories = [
              {
                  "id": "1",
                  "text": "abc",
                  "src": "https://cdn-images-1.medium.com/max/1200/1*dIocy2HvI_BIpziOypf8ig.jpeg"
              },
              {
                  "id": "2",
                  "text": "dbef",
                  "src": "https://cdn-images-1.medium.com/max/1200/1*dIocy2HvI_BIpziOypf8ig.jpeg"
              },
  
              {
                  "id": "3",
                  "text":"bghi",
                  "src":"https://cdn-images-1.medium.com/max/1200/1*dIocy2HvI_BIpziOypf8ig.jpeg"
              },
              {
                  "id": "4",
                  "text":"jbkl",
                  "src":"https://cdn-images-1.medium.com/max/1200/1*dIocy2HvI_BIpziOypf8ig.jpeg"
              }
          ];
          this.state = {text:"",
              categories: []
          }
      }
  
      search(text)
      {
          var searchResults = [];
          var categories = this.all_categories;
          for (var i = categories.length - 1; i &gt;= 0; i--)
          {
              includes(categories[i]['text'], text) &amp;&amp; searchResults.push(categories[i])
          }
          console.log("text searched is " + text);
          console.log(searchResults);
          return searchResults;
      }
  
      _keyExtractor = (item, index) =&gt; item.id;
  
      _renderItem(item)
      {
          console.log("item to render is");
          console.log(item);
          return &lt;SearchListItem text={item.text} src={item.src}/&gt;
      }
  
    render() {    
        console.log("rendered");
        console.log("categories to display are");
        console.log(this.state.categories);
        return (
            &lt;View&gt;
                &lt;View style={{height:30,width:"100%"}}/&gt;
                &lt;SearchBar
                    round
                    lightTheme
                    containerStyle={{
                        backgroundColor:'transparent',
                        borderTopWidth: 0,
                        borderBottomWidth: 0,
                    }}
                    placeholder="Search!"
                    inputStyle = {{backgroundColor:'white'}}
                    onChangeText={ (text) =&gt;
                    {
                        let result = this.search(text);
                        console.log("changing state");
                        this.setState({categories:result, text:text})
                    }}
                    value={this.state.text}
                /&gt;
                &lt;FlatList style={{flex:1}}
                    removeClippedSubviews={false}
                    data={this.state.categories}
                    keyExtractor={this._keyExtractor}
                    renderItem={this._renderItem}
                /&gt;
            &lt;/View&gt;
        )
    }
  }
  </code></pre>
  
  <p>Searching gives all the valid results but not able to show the list corresponding to the results.What I have done wrong?</p>