Skip to content

Commit

Permalink
RN: Stop Exporting Perf and TestUtils
Browse files Browse the repository at this point in the history
Reviewed By: sebmarkbage

Differential Revision: D4024221

fbshipit-source-id: d35e3dfbff8cc9ce08d34f854b9eb8c79fc1d4af
  • Loading branch information
yungsters authored and Facebook Github Bot committed Oct 15, 2016
1 parent 421e788 commit c7d6823
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions Libraries/react-native/react-native.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ const ReactNative = {
}
return require('react/lib/LinkedStateMixin');
},
Perf: undefined,
get PureRenderMixin() {
if (__DEV__) {
addonWarn('PureRenderMixin', 'react-addons-pure-render-mixin');
Expand All @@ -145,7 +144,6 @@ const ReactNative = {
}
return require('NativeModules').TestModule;
},
TestUtils: undefined,
get batchedUpdates() {
if (__DEV__) {
warning(
Expand Down Expand Up @@ -181,7 +179,7 @@ if (__DEV__) {
Object.defineProperty(ReactNative, key, {
get() { throwOnWrongReactAPI(key); },
enumerable: false,
configurable: false
configurable: false,
});
}
}
Expand All @@ -203,26 +201,4 @@ function applyForwarding(key) {
for (const key in ReactNativeInternal) {
applyForwarding(key);
}

if (__DEV__) {
Object.defineProperty(ReactNative.addons, 'Perf', {
enumerable: true,
get: () => {
if (__DEV__) {
addonWarn('Perf', 'react-addons-perf');
}
return require('react/lib/ReactPerf');
}
});
Object.defineProperty(ReactNative.addons, 'TestUtils', {
enumerable: true,
get: () => {
if (__DEV__) {
addonWarn('update', 'react-addons-test-utils');
}
return require('react/lib/ReactTestUtils');
}
});
}

module.exports = ReactNative;

0 comments on commit c7d6823

Please sign in to comment.