From ea124a044c8eca6c1eecc8f898c80864d0f6b094 Mon Sep 17 00:00:00 2001 From: Thibault Malbranche Date: Wed, 19 Sep 2018 09:57:24 -0700 Subject: [PATCH] Remove extra WKWebView file not used (#21182) Summary: This file was created recently but is not used as the WKWebview was integrated directly into the Webview.ios.js Removing this file to clarify the situation Pull Request resolved: https://github.com/facebook/react-native/pull/21182 Differential Revision: D9942905 Pulled By: hramos fbshipit-source-id: 19e9fba94280428edd1deab4a54f8c5dc42a6bfa --- .../Components/WKWebView/WKWebView.ios.js | 42 ------------------- 1 file changed, 42 deletions(-) delete mode 100644 Libraries/Components/WKWebView/WKWebView.ios.js diff --git a/Libraries/Components/WKWebView/WKWebView.ios.js b/Libraries/Components/WKWebView/WKWebView.ios.js deleted file mode 100644 index 5040441fe5..0000000000 --- a/Libraries/Components/WKWebView/WKWebView.ios.js +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow - * @providesModule WKWebView - */ - -const React = require('react'); - -const requireNativeComponent = require('requireNativeComponent'); - -const RCTWKWebView = requireNativeComponent('RCTWKWebView'); - -type RCTWKWebViewProps = { - allowsInlineMediaPlayback?: boolean, - mediaPlaybackRequiresUserAction?: boolean, - dataDetectorTypes?: boolean, -}; - -class WKWebView extends React.Component { - componentWillReceiveProps(nextProps: RCTWKWebViewProps) { - this.showRedboxOnPropChanges(nextProps, 'allowsInlineMediaPlayback'); - this.showRedboxOnPropChanges(nextProps, 'mediaPlaybackRequiresUserAction'); - this.showRedboxOnPropChanges(nextProps, 'dataDetectorTypes'); - } - - showRedboxOnPropChanges(nextProps: RCTWKWebViewProps, propName: string) { - if (this.props[propName] !== nextProps[propName]) { - console.error(`Changes to property ${propName} do nothing after the initial render.`); - } - } - - render() { - return ; - } -} - -module.exports = WKWebView;