diff --git a/Examples/Movies/MoviesApp.js b/Examples/Movies/MoviesApp.js index 768ad895a..6c74c45b5 100644 --- a/Examples/Movies/MoviesApp.js +++ b/Examples/Movies/MoviesApp.js @@ -6,7 +6,7 @@ */ 'use strict'; -var React = require('react-native/addons'); +var React = require('react-native'); var { AppRegistry, NavigatorIOS, diff --git a/Examples/UIExplorer/NavigatorIOSExample.js b/Examples/UIExplorer/NavigatorIOSExample.js index 1d09d32a3..7b9234605 100644 --- a/Examples/UIExplorer/NavigatorIOSExample.js +++ b/Examples/UIExplorer/NavigatorIOSExample.js @@ -3,7 +3,7 @@ */ 'use strict'; -var React = require('react-native/addons'); +var React = require('react-native'); var ViewExample = require('./ViewExample'); var { PixelRatio, diff --git a/Examples/UIExplorer/UIExplorerApp.js b/Examples/UIExplorer/UIExplorerApp.js index 95d02347e..c234d54b6 100644 --- a/Examples/UIExplorer/UIExplorerApp.js +++ b/Examples/UIExplorer/UIExplorerApp.js @@ -5,7 +5,7 @@ */ 'use strict'; -var React = require('react-native/addons'); +var React = require('react-native'); var UIExplorerList = require('./UIExplorerList'); var { diff --git a/Examples/UIExplorer/UIExplorerList.js b/Examples/UIExplorer/UIExplorerList.js index 97dddacb7..5ca5254ec 100644 --- a/Examples/UIExplorer/UIExplorerList.js +++ b/Examples/UIExplorer/UIExplorerList.js @@ -3,7 +3,7 @@ */ 'use strict'; -var React = require('react-native/addons'); +var React = require('react-native'); var { ListView, PixelRatio, diff --git a/Libraries/react-native/addons.js b/Libraries/react-native/addons.js deleted file mode 100644 index 864d8906d..000000000 --- a/Libraries/react-native/addons.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Copyright 2004-present Facebook. All Rights Reserved. - * - * @flow - */ -'use strict'; - -var LinkedStateMixin = require('LinkedStateMixin'); -var ReactComponentWithPureRenderMixin = require('ReactComponentWithPureRenderMixin'); -var ReactNative = require('react-native'); -var ReactUpdates = require('ReactUpdates'); - -var cloneWithProps = require('cloneWithProps'); -var update = require('update'); - -var addons = { - LinkedStateMixin: LinkedStateMixin, - PureRenderMixin: ReactComponentWithPureRenderMixin, - batchedUpdates: ReactUpdates.batchedUpdates, - cloneWithProps: cloneWithProps, - update: update, - Perf: undefined, - TestUtils: undefined, -}; - -if (__DEV__) { - addons.Perf = require('ReactDefaultPerf'); - addons.TestUtils = require('ReactTestUtils'); -} - -var ReactNativeWithAddons = { - ...ReactNative, - addons: addons, -}; - -module.exports = ReactNativeWithAddons; diff --git a/Libraries/react-native/package.json b/Libraries/react-native/package.json deleted file mode 100644 index e8306d485..000000000 --- a/Libraries/react-native/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "react-native", - "main": "react-native.js", - "directories": {".": ""} -} diff --git a/Libraries/react-native/react-native.js b/Libraries/react-native/react-native.js index 8c53abd53..a79bde05f 100644 --- a/Libraries/react-native/react-native.js +++ b/Libraries/react-native/react-native.js @@ -45,7 +45,20 @@ var ReactNative = { TimerMixin: require('TimerMixin'), VibrationIOS: require('VibrationIOS'), - invariant: require('invariant'), + addons: { + batchedUpdates: require('ReactUpdates').batchedUpdates, + LinkedStateMixin: require('LinkedStateMixin'), + Perf: undefined, + PureRenderMixin: require('ReactComponentWithPureRenderMixin'), + TestUtils: undefined, + cloneWithProps: require('cloneWithProps'), + update: require('update'), + }, }; +if (__DEV__) { + ReactNative.addons.Perf = require('ReactDefaultPerf'); + ReactNative.addons.TestUtils = require('ReactTestUtils'); +} + module.exports = ReactNative; diff --git a/package.json b/package.json index 7c1e940e9..38ac7fd4b 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "react-native-github", + "name": "react-native", "version": "0.1.0", "description": "Build native apps with React!", "repository": { @@ -20,6 +20,7 @@ "source-map" ] }, + "main": "Libraries/react-native/react-native.js", "scripts": { "test": "jest", "lint": "node linter.js Examples/",