title: if statement in render method - react native
body: <p>i would like to use <code>if</code> statement in the return of render method , what i mean is something like this : </p>
  
  <pre><code>export default class App extends Component 
  {
  
     render()
     {
          return(
               &lt;View&gt;
                 if(this.state.error)
                 {
                   &lt;View&gt;
                         &lt;Image source={{"error"}} /&gt;
                         &lt;Text&gt;An Error Happen&lt;/Text&gt;
                     &lt;/View&gt;
                 }
                 else
                 {
                     &lt;View&gt;
                         &lt;List dataArray={this.state.items}&gt;&lt;/List&gt;
                     &lt;/View&gt;
                  }
                &lt;/View&gt;
          );
     }
  
  }
  </code></pre>
  
  <p>i can use ternary operator , but what i want is to use <code>if</code> statement if it possible  </p>