mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-26 07:04:05 +08:00
Move requireNativeComponent call below the complete MapView definition
requireNativeComponent should be called after the wrapper component is fully defined, including its static properties.
This commit is contained in:
@@ -87,8 +87,6 @@ class MapView extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
var RCTMap = requireNativeComponent('RCTMap', MapView);
|
||||
|
||||
MapView.propTypes = {
|
||||
/**
|
||||
* When this property is set to `true` and a valid camera is associated
|
||||
@@ -100,6 +98,8 @@ MapView.propTypes = {
|
||||
pitchEnabled: React.PropTypes.bool,
|
||||
};
|
||||
|
||||
var RCTMap = requireNativeComponent('RCTMap', MapView);
|
||||
|
||||
module.exports = MapView;
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user