我正在使用react-native-webview
来显示网络视图。当我更改任何页面(非SPA)事件时都会触发。但是,当我在SPA应用程序onNavigationStateChange
中更改url时,不会触发事件。是否有可能在SPA中触发事件
import {WebView} from 'react-native-webview';
<WebView
source={{uri: 'https://www.flipkart.com/'}}
bounces={true}
startInLoadingState
scalesPageToFit
javaScriptEnabledAndroid={true}
javaScriptEnabled={true}
onNavigationStateChange={handleNavigationStateChange}
onLoadStart={() => {
console.log('LOAD START ');
}}
onLoadEnd={() => {
console.log('LOAD END');
}}
onError={(err) => {
console.log('ERROR ');
console.log(err);
}}
/>