这里RN版本0.62.2
yarn add react-native-qrcode-scanner@1.4.1
import QRCodeScanner from "react-native-qrcode-scanner";
<QRCodeScanner
style={styles.scanner}
onRead={this.onSuccess} // 扫描成功回调
reactivate={this.state.reactivate} // 扫码器是否开启扫描 boolean
cameraStyle={styles.scanner}
/>