mirror of
https://github.com/status-im/react-native.git
synced 2025-02-05 22:23:37 +00:00
RN: Stop Exporting Perf
and TestUtils
Reviewed By: sebmarkbage Differential Revision: D4024221 fbshipit-source-id: d35e3dfbff8cc9ce08d34f854b9eb8c79fc1d4af
This commit is contained in:
parent
421e7880d9
commit
c7d68238ec
26
Libraries/react-native/react-native.js
vendored
26
Libraries/react-native/react-native.js
vendored
@ -127,7 +127,6 @@ const ReactNative = {
|
||||
}
|
||||
return require('react/lib/LinkedStateMixin');
|
||||
},
|
||||
Perf: undefined,
|
||||
get PureRenderMixin() {
|
||||
if (__DEV__) {
|
||||
addonWarn('PureRenderMixin', 'react-addons-pure-render-mixin');
|
||||
@ -145,7 +144,6 @@ const ReactNative = {
|
||||
}
|
||||
return require('NativeModules').TestModule;
|
||||
},
|
||||
TestUtils: undefined,
|
||||
get batchedUpdates() {
|
||||
if (__DEV__) {
|
||||
warning(
|
||||
@ -181,7 +179,7 @@ if (__DEV__) {
|
||||
Object.defineProperty(ReactNative, key, {
|
||||
get() { throwOnWrongReactAPI(key); },
|
||||
enumerable: false,
|
||||
configurable: false
|
||||
configurable: false,
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user