react-native-baidumap
react-native-baidumap copied to clipboard
Compatibility Issue under version 0.27
index.js needs to be modified because of packages changes:
var React = require('react'); var { PropTypes, } = React; var ReactNative = require('react-native'); var { EdgeInsetsPropType, Image, NativeMethodsMixin, Platform, requireNativeComponent, StyleSheet, View, UIManager, processColor, ColorPropType, } = ReactNative;
test success on android
这个应该是从0.25版本就开始有这个兼容性问题了。开发这个库的时候react-native版本还是0.20,从0.25以后,引用react从原来的require('react-native')里改为require('react').
我在调试的时候也是出现这个问题,除了要改index.js外,KKLocation.js中也要作相应的修改。
刚刚试用了一下,觉得还是挺好用的,感谢作者的劳动。 也希望作者可以抽点时间,兼容到现在的0.28版本,造福新手,哈哈。