React-native: Webview loading state (renderLoading) is never shown

Created on 18 Apr 2015  路  4Comments  路  Source: facebook/react-native

Looks like WebViewState is never set to loading, hence the renderLoading function is never executed.

Locked

Most helpful comment

Add this attribute to your tag: startInLoadingState={true}

All 4 comments

Add this attribute to your tag: startInLoadingState={true}

:+1:

@Benmidi's comment is completely correct :smile:

Hi @brentvatne - Is it possible to show the content of webview as the page loads? Right now the webview loads for a long time(a spinner) and displays the finally rendered content at the end. Is there a way we could show the webview's partially loaded content as the page loads the data, then end user will atleast get a feel that the view is loading the web page. I tried different options given in the WebView documentation but none seems to help. Following is the code I am using for your reference.

     <WebView
       source={{uri: this.props.name}}
       startInLoadingState={true}
     />
Was this page helpful?
0 / 5 - 0 ratings