Add object in NativeModules

点点圈 提交于 2019-12-02 16:11:29

问题


I would like to use https://github.com/dgladkov/react-native-image-rotate in react-native project

I download it with yarn add react-native-image-rotate

I link it with react-native link

I import it in my component with import ImageRotate from 'react-native-image-rotate';

But when I try to use it I have a Cannot read property 'rotateImage' of undefined

I put a break-point in node_modules/react-native-image-rotate/index.js on the line:

const RCTImageRotateModule = NativeModules.ImageRotateModule;

And in the object NativeModules there is no ImageRotateModule object.

How Can I add ImageRotateModule in NativeModules ?

Im using react-native 0.50.3

Thx


回答1:


react-native link react-native-image-rotate


来源:https://stackoverflow.com/questions/47713430/add-object-in-nativemodules

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!