mirror of
https://github.com/status-im/react-native.git
synced 2025-02-05 14:13:26 +00:00
Work around flow bug with exports
This commit is contained in:
parent
b612741b21
commit
0a88663b1e
13
Libraries/react-native/react-native.js
vendored
13
Libraries/react-native/react-native.js
vendored
@ -5,9 +5,14 @@
|
|||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var ReactNative = {
|
// Export React, plus some native additions.
|
||||||
...require('React'),
|
//
|
||||||
|
// 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
|
// Components
|
||||||
ActivityIndicatorIOS: require('ActivityIndicatorIOS'),
|
ActivityIndicatorIOS: require('ActivityIndicatorIOS'),
|
||||||
DatePickerIOS: require('DatePickerIOS'),
|
DatePickerIOS: require('DatePickerIOS'),
|
||||||
@ -54,7 +59,7 @@ var ReactNative = {
|
|||||||
cloneWithProps: require('cloneWithProps'),
|
cloneWithProps: require('cloneWithProps'),
|
||||||
update: require('update'),
|
update: require('update'),
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
if (__DEV__) {
|
if (__DEV__) {
|
||||||
ReactNative.addons.Perf = require('ReactDefaultPerf');
|
ReactNative.addons.Perf = require('ReactDefaultPerf');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user