Skip to content

Commit

Permalink
Remove React addons from react-native-implementation
Browse files Browse the repository at this point in the history
Summary:
These modules don't exist in React anymore so this causes new apps to redscreen because the packager cannot resolve those modules.

**Test plan**
Tested that this and removing NavigationExperimental (it also uses removed React exports) causes UIExplorer to work again.
Closes #13095

Differential Revision: D4757762

Pulled By: ericvicenti

fbshipit-source-id: bb246d4c6b15f5d3c71e31f133a468aea220f308
  • Loading branch information
janicduplessis authored and facebook-github-bot committed Mar 23, 2017
1 parent d9910a5 commit 14c31d9
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions Libraries/react-native/react-native-implementation.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,50 +124,6 @@ const ReactNative = {
get ColorPropType() { return require('ColorPropType'); },
get EdgeInsetsPropType() { return require('EdgeInsetsPropType'); },
get PointPropType() { return require('PointPropType'); },

// See http://facebook.github.io/react/docs/addons.html
addons: {
get PureRenderMixin() {
if (__DEV__) {
addonWarn('PureRenderMixin', 'react-addons-pure-render-mixin');
}
return require('react/lib/ReactComponentWithPureRenderMixin');
},
get TestModule() {
if (__DEV__) {
warning(
warningDedupe.TestModule,
'React.addons.TestModule is deprecated. ' +
'Use ReactNative.NativeModules.TestModule instead.'
);
warningDedupe.TestModule = true;
}
return require('NativeModules').TestModule;
},
get batchedUpdates() {
if (__DEV__) {
warning(
warningDedupe.batchedUpdates,
'React.addons.batchedUpdates is deprecated. ' +
'Use ReactNative.unstable_batchedUpdates instead.'
);
warningDedupe.batchedUpdates = true;
}
return require('ReactUpdates').batchedUpdates;
},
get createFragment() {
if (__DEV__) {
addonWarn('createFragment', 'react-addons-create-fragment');
}
return require('react/lib/ReactFragment').create;
},
get update() {
if (__DEV__) {
addonWarn('update', 'react-addons-update');
}
return require('react/lib/update');
},
},
};

// Better error messages when accessing React APIs on ReactNative
Expand Down

0 comments on commit 14c31d9

Please sign in to comment.