title: React Native Conditional onPress in List Item
body: <p>I am generating a list with List item in React native, and for a specific reason I want the first item to navigate to a different screen and all other item to a different screen. </p>
  
  <p>I am putting the condition with ternary operator for the same but there is no success </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;View style={{flex: 1, backgroundColor: '#fff'}}&gt;
                      &lt;List containerStyle={{ borderTopWidth: 0, borderBottomWidth: 0 }}&gt;
                      &lt;FlatList
                          data={this.state.schools}
                          renderItem={({ item }) =&gt; ({
                          item.school_name == "all" ?
                          &lt;ListItem
                              title={item.school_name}
                              onPress={()=&gt;this.props.navigation.navigate('DepartmentSchools', {
                                  school_name: item.school_name,
                                  school_id : item.school_id
                              })}
                          /&gt; : 
                          &lt;ListItem
                              title={item.school_name}
                              onPress={()=&gt;this.props.navigation.navigate('DepartmentIndividual', {
                                  school_name: item.school_name,
                                  school_id : item.school_id
                              })}
                          /&gt;
                          })}
                          keyExtractor={item =&gt; item.school_name}
                          ItemSeparatorComponent={this.renderSeparator}
                      /&gt;
                      &lt;/List&gt;
                      &lt;/View&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Please help in resolve this or you can point out my mistake. </p>
  
  <p>Thanks in advance. </p>