Syncing url on navigation

This commit is contained in:
Manoj Vivek 2019-08-15 11:23:30 +05:30
parent 1f418cfb4b
commit a8624c1f87

View file

@ -25,6 +25,11 @@ class WebView extends Component {
this.webviewRef.current.addEventListener('dom-ready', () => {
this.initEventTriggers(this.webviewRef.current);
});
this.webviewRef.current.addEventListener('will-navigate', ({url}) => {
console.log('Navigating to ', url);
this.props.onAddressChange(url);
});
}
componentDidUpdate(prevProps, prevState) {