From 2ac9cc1ffcf60689323913c447b0e18c53f6217f Mon Sep 17 00:00:00 2001 From: James Munro Date: Mon, 18 Feb 2019 04:01:20 -0800 Subject: [PATCH] Remove SnapshotViewIOS from public interface (#23497) Summary: Part of Lean Core #23313 Removes `SnapshotViewIOS` from the public RN interface. I think there's a wider discussion to be had here about whether `RCTTest` should be part of the public distribution or at least whether this should be split into a separate utils package. It's mainly used by the RNTester app. It seems to be little known about but there are [some references to it online](https://blog.callstack.io/testing-your-react-native-apps-abfe41903dfd). [iOS] [Removed] - `SnapshotViewIOS` is no longer publicly exported from RN Pull Request resolved: https://github.com/facebook/react-native/pull/23497 Differential Revision: D14123280 Pulled By: cpojer fbshipit-source-id: badaf6cb5d2195268f0f8b429fc11d6525747708 --- Libraries/react-native/react-native-implementation.js | 3 --- RNTester/js/RNTesterApp.ios.js | 2 +- {Libraries/RCTTest => RNTester/js}/SnapshotViewIOS.android.js | 0 {Libraries/RCTTest => RNTester/js}/SnapshotViewIOS.ios.js | 0 4 files changed, 1 insertion(+), 4 deletions(-) rename {Libraries/RCTTest => RNTester/js}/SnapshotViewIOS.android.js (100%) rename {Libraries/RCTTest => RNTester/js}/SnapshotViewIOS.ios.js (100%) diff --git a/Libraries/react-native/react-native-implementation.js b/Libraries/react-native/react-native-implementation.js index 2386ca25add57e..b35910c818ac4e 100644 --- a/Libraries/react-native/react-native-implementation.js +++ b/Libraries/react-native/react-native-implementation.js @@ -124,9 +124,6 @@ module.exports = { ); return require('Slider'); }, - get SnapshotViewIOS() { - return require('SnapshotViewIOS'); - }, get Switch() { return require('Switch'); }, diff --git a/RNTester/js/RNTesterApp.ios.js b/RNTester/js/RNTesterApp.ios.js index 2ef1ff817e2d8a..0ba8d62eb7f062 100644 --- a/RNTester/js/RNTesterApp.ios.js +++ b/RNTester/js/RNTesterApp.ios.js @@ -21,12 +21,12 @@ const RNTesterExampleContainer = require('./RNTesterExampleContainer'); const RNTesterExampleList = require('./RNTesterExampleList'); const RNTesterList = require('./RNTesterList.ios'); const RNTesterNavigationReducer = require('./RNTesterNavigationReducer'); +const SnapshotViewIOS = require('./SnapshotViewIOS.ios'); const URIActionMap = require('./URIActionMap'); const { Button, AppRegistry, - SnapshotViewIOS, StyleSheet, Text, View, diff --git a/Libraries/RCTTest/SnapshotViewIOS.android.js b/RNTester/js/SnapshotViewIOS.android.js similarity index 100% rename from Libraries/RCTTest/SnapshotViewIOS.android.js rename to RNTester/js/SnapshotViewIOS.android.js diff --git a/Libraries/RCTTest/SnapshotViewIOS.ios.js b/RNTester/js/SnapshotViewIOS.ios.js similarity index 100% rename from Libraries/RCTTest/SnapshotViewIOS.ios.js rename to RNTester/js/SnapshotViewIOS.ios.js