Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 28463

Stop loading Webview in react native

$
0
0

I have react native project on Android platform. I have a Webview loaded from url. When user click any url, i want navigate to screen in my app and webview will stop loading. So in my onNavigationStateChange() function

  source = {{uri:this.props.htmlUrl}}
    ref='_webView'
    scrollEnabled={true}
    javaScriptEnabled={true}
    domStorageEnabled={true}
    onNavigationStateChange ={(navState)=>{
      //handle navigate another screen
       this.refs._webView.stopLoading();
    }}

It works. So when i go back, and click other url, I can not touch any url in webview. If someone meet the same issue, please help me. Thanks in advance.


Viewing all articles
Browse latest Browse all 28463

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>