title: How to get a specific item of a Flatlist in React-Native
body: <p>How can I only render the item in a FlatList if the item.id is the same like the id in the json?</p>
  
  <p>I'm new to react-native and JavaScript so maybe it's a stupid question.</p>
  
  <h3>My Code so far:</h3>
  
  <pre><code>export default class DetailsScreen extends Component {
    constructor(props) {
      super(props);
      this.state = {
        isLoading: true,
        dataSource: [],
      };
    }
  
    componentDidMount() {
      this.setState({
        isLoading: false,
        dataSource: data.data
      });
    }
  
  render() {
      if (this.state.isLoading) {
        return (
          &lt;View&gt;
            &lt;ActivityIndicator /&gt;
          &lt;/View&gt;
        );
      }
      return (
        &lt;View&gt;
          &lt;FlatList
            data={this.state.dataSource}
            renderItem={({ item }) =&gt; (this.renderDetailView(item))}
            keyExtractor={(item, index) =&gt; index.toString()}
          /&gt;
        &lt;/View&gt;
      );
    }
  }
  </code></pre>
  
  <p>That's the simple rendering of the Flatlist and this work quite good.
  The 'renderDetailView' is very complex and long so I couldn't add the code.</p>
  
  <p>But it look like this:</p>
  
  <pre><code>renderDetailView(item) {
      return (
        &lt;View style={styles.info} key={item.id}&gt;
          &lt;View&gt;
            &lt;Text style={styles.detailView}&gt;
              {item.name}
            &lt;/Text&gt;
            &lt;Text&gt;{'\n'}&lt;/Text&gt;
          &lt;/View&gt;
           ...
        &lt;/View&gt;
      );
    }
  </code></pre>
  
  <p>At the final project i want to handle a click on an other FlatList and show the detail of the clicked item. the clicked Item 'send' the id to this class and so i get the specific detailView.</p>
  
  <p>Sorry for my bad English.</p>