Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Exports] Expose more modules for authors of custom components #196

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Libraries/Components/ScrollResponder.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
*/
'use strict';

var NativeModules = require('NativeModules');
var NativeModules = require('NativeModules');
var RCTDeviceEventEmitter = require('RCTDeviceEventEmitter');
var Subscribable = require('Subscribable');
Expand Down
16 changes: 14 additions & 2 deletions Libraries/react-native/react-native.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,18 @@
*/
'use strict';

var React = require('React');

// Export React, plus some native additions.
//
// The use of Object.create/assign is to work around a Flow bug (#6560135).
// Once that is fixed, change this back to
//
// var ReactNative = {...require('React'), /* additions */}
// var ReactNative = {...React, /* additions */}
//
var ReactNative = Object.assign(Object.create(require('React')), {
var ReactNative = Object.assign(Object.create(React), {
React,

// Components
ActivityIndicatorIOS: require('ActivityIndicatorIOS'),
DatePickerIOS: require('DatePickerIOS'),
Expand All @@ -29,6 +33,7 @@ var ReactNative = Object.assign(Object.create(require('React')), {
ReactNavigator: require('ReactNavigator'),
ScrollView: require('ScrollView'),
SliderIOS: require('SliderIOS'),
StaticContainer: require('StaticContainer.react'),
SwitchIOS: require('SwitchIOS'),
TabBarIOS: require('TabBarIOS'),
Text: require('Text'),
Expand Down Expand Up @@ -60,11 +65,18 @@ var ReactNative = Object.assign(Object.create(require('React')), {
// Plugins
DeviceEventEmitter: require('RCTDeviceEventEmitter'),
NativeModules: require('NativeModules'),
ReactIOSViewAttributes: require('ReactIOSViewAttributes'),
createReactIOSNativeComponentClass: require('createReactIOSNativeComponentClass'),

// Prop Types
EdgeInsetsPropType: require('EdgeInsetsPropType'),
PointPropType: require('PointPropType'),

addons: {
LinkedStateMixin: require('LinkedStateMixin'),
Perf: undefined,
PureRenderMixin: require('ReactComponentWithPureRenderMixin'),
StaticRenderer: require('StaticRenderer'),
TestModule: require('NativeModules').TestModule,
TestUtils: undefined,
batchedUpdates: require('ReactUpdates').batchedUpdates,
Expand Down