react-native-wkwebview icon indicating copy to clipboard operation
react-native-wkwebview copied to clipboard

Introduce onCanGoBackChange & onCanGoForwardChange

Open mkhazov opened this issue 5 years ago • 0 comments

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) => {} }
/>

mkhazov avatar Nov 14 '18 10:11 mkhazov