/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * This file exists because react-native.js started using getters and setters * and Flow doesn't have a good way to enable getters and setters for * react-native without forcing all react-native users to also enable getters * and setters. Until we solve that issue, we can use this .flow file to * pretend like react-native doesn't use getters and setters * * @flow */ 'use strict'; // 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 = Object.assign(Object.create(require('React')), { // Components ActivityIndicatorIOS: require('ActivityIndicatorIOS'), ART: require('ReactNativeART'), Button: require('Button'), DatePickerIOS: require('DatePickerIOS'), Image: require('Image'), ImageEditor: require('ImageEditor'), ImageStore: require('ImageStore'), ListView: require('ListView'), MapView: require('MapView'), Modal: require('Modal'), PickerIOS: require('PickerIOS'), ProgressViewIOS: require('ProgressViewIOS'), ScrollView: require('ScrollView'), SegmentedControlIOS: require('SegmentedControlIOS'), SliderIOS: require('SliderIOS'), Slider: require('Slider'), SnapshotViewIOS: require('SnapshotViewIOS'), Switch: require('Switch'), RecyclerViewBackedScrollView: require('RecyclerViewBackedScrollView'), RefreshControl: require('RefreshControl'), Text: require('Text'), TextInput: require('TextInput'), Touchable: require('Touchable'), ToolbarAndroid: require('ToolbarAndroid'), TabBarIOS: require('TabBarIOS'), TouchableHighlight: require('TouchableHighlight'), TouchableOpacity: require('TouchableOpacity'), TouchableWithoutFeedback: require('TouchableWithoutFeedback'), View: require('View'), WebView: require('WebView'), // APIs ActionSheetIOS: require('ActionSheetIOS'), AdSupportIOS: require('AdSupportIOS'), Alert: require('Alert'), AlertIOS: require('AlertIOS'), Animated: require('Animated'), AppRegistry: require('AppRegistry'), AppState: require('AppState'), AsyncStorage: require('AsyncStorage'), CameraRoll: require('CameraRoll'), Clipboard: require('Clipboard'), Dimensions: require('Dimensions'), Easing: require('Easing'), ImagePickerIOS: require('ImagePickerIOS'), InteractionManager: require('InteractionManager'), LayoutAnimation: require('LayoutAnimation'), Linking: require('Linking'), NetInfo: require('NetInfo'), MenuManager: require('MenuManager'), PanResponder: require('PanResponder'), PixelRatio: require('PixelRatio'), PushNotificationIOS: require('PushNotificationIOS'), Settings: require('Settings'), StyleSheet: require('StyleSheet'), UIManager: require('UIManager'), // Plugins DeviceEventEmitter: require('RCTDeviceEventEmitter'), NativeAppEventEmitter: require('RCTNativeAppEventEmitter'), NativeModules: require('NativeModules'), Platform: require('Platform'), processColor: require('processColor'), requireNativeComponent: require('requireNativeComponent'), // Prop Types ColorPropType: require('ColorPropType'), EdgeInsetsPropType: require('EdgeInsetsPropType'), PointPropType: require('PointPropType'), // See http://facebook.github.io/react/docs/addons.html addons: { LinkedStateMixin: require('LinkedStateMixin'), Perf: undefined, PureRenderMixin: require('ReactComponentWithPureRenderMixin'), TestModule: require('NativeModules').TestModule, TestUtils: undefined, batchedUpdates: require('ReactUpdates').batchedUpdates, cloneWithProps: require('cloneWithProps'), createFragment: require('ReactFragment').create, update: require('update'), }, }); if (__DEV__) { ReactNative.addons.Perf = require('ReactDefaultPerf'); ReactNative.addons.TestUtils = require('ReactTestUtils'); } module.exports = ReactNative;