Updated ref to use react.createRef

This commit is contained in:
Thibault Malbranche 2018-09-19 01:25:02 +02:00
parent 2dea7b53ce
commit 7df0ccd24e
1 changed files with 2 additions and 2 deletions

View File

@ -255,7 +255,7 @@ class WebView extends React.Component<WebViewSharedProps, State> {
const webView = (
<NativeWebView
ref={webViewRef}
ref={this.webViewRef}
key="webViewKey"
style={webViewStyles}
source={resolveAssetSource(source)}
@ -390,7 +390,7 @@ class WebView extends React.Component<WebViewSharedProps, State> {
* Returns the native `WebView` node.
*/
getWebViewHandle = () => {
return ReactNative.findNodeHandle(webViewRef.current);
return ReactNative.findNodeHandle(this.webViewRef.current);
};
_onLoadingStart = (event: WebViewNavigationEvent) => {