react-native-wkwebview
react-native-wkwebview copied to clipboard
Introduce onCanGoBackChange & onCanGoForwardChange
WKWebview does not trigger onProgress
and onNavigationStateChange
when navigation occurs in SPA (e.g. React app with react-router navigation).
The issue is solved by adding key-value observers for canGoBack
and canGoForward
properties and passing them to corresponding functions passed as props from React Native.
Usage:
<WKWebview
onCanGoBackChange={ (canGoBack: boolean) => {} }
onCanGoForwardChange={ (canGoForward: boolean) => {} }
/>