在 NativeModules 中添加对象
Add object in NativeModules
我想在 react-native 项目中使用 https://github.com/dgladkov/react-native-image-rotate
我用yarn add react-native-image-rotate
下载
我link它与react-native link
我用 import ImageRotate from 'react-native-image-rotate';
将它导入到我的组件中
但是当我尝试使用它时,我有一个 Cannot read property 'rotateImage' of undefined
我在node_modules/react-native-image-rotate/index.js线上打了一个断点:
const RCTImageRotateModule = NativeModules.ImageRotateModule;
并且在对象 NativeModules 中没有 ImageRotateModule 对象。
如何在 NativeModules
中添加 ImageRotateModule
?
我正在使用 react-native 0.50.3
感谢
react-native link react-native-image-rotate
我想在 react-native 项目中使用 https://github.com/dgladkov/react-native-image-rotate
我用yarn add react-native-image-rotate
我link它与react-native link
我用 import ImageRotate from 'react-native-image-rotate';
但是当我尝试使用它时,我有一个 Cannot read property 'rotateImage' of undefined
我在node_modules/react-native-image-rotate/index.js线上打了一个断点:
const RCTImageRotateModule = NativeModules.ImageRotateModule;
并且在对象 NativeModules 中没有 ImageRotateModule 对象。
如何在 NativeModules
中添加 ImageRotateModule
?
我正在使用 react-native 0.50.3
感谢
react-native link react-native-image-rotate