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:
James Ide 2015-05-13 21:05:50 -07:00
parent fec81947bd
commit 69db752067
1 changed files with 2 additions and 2 deletions

View File

@ -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;
```