React Native WebView Loading Error Handling
<p>When the webview loads an invalid url, which property should I set to display an error view? I try renderError, it triggers the console message but did not display the view.</p>

<p>here's the code:</p>

<pre><code>&lt;View style={styles.webview_body}&gt;
  &lt;WebView
   source={{uri:this.props.url}}
   onNavigationStateChange={this.onNavigationStateChange.bind(this)}
   renderError={this.loadError.bind(this)}
 /&gt;
&lt;/View&gt;

//the fucntion which display the error message
loadError(){
console.log('loaded');
return (
  &lt;View&gt;
    &lt;Text&gt;
    something goes wrong.
    &lt;/Text&gt;
  &lt;/View&gt;
)
}
</code></pre>

<p>here's the screenshots</p>

<p><a href="https://i.stack.imgur.com/XKmYH.png" rel="noreferrer"><img src="https://i.stack.imgur.com/XKmYH.png" alt="enter image description here"></a></p>

<p><strong>[Update]</strong> As I reload to clear the error, there's a temporary state which display the error view.</p>

<p><a href="https://i.stack.imgur.com/nlce7.png" rel="noreferrer"><img src="https://i.stack.imgur.com/nlce7.png" alt="enter image description here"></a></p>