引用:为import WeChat from 'react-native-wechat';
但是到注册应用时就会报这样的错误:undefined is not an object (evaluating '_reactNative Wechat2.default.registerApp')
[email protected]
[email protected]
求解
可以重新安装并 react-native link 一下~
重新安装过了,还是这样……
import * as WeChat from 'react-native-wechat';
OK, 使用nukc 提供的方法可以正常使用了,thanks。
~
import * as WeChat from 'react-native-wechat';
~
我碰到类似问题。
undefined is not an object (evaluating 'Wechat.registerApp')
[email protected]
[email protected]

Update:
请尝试手动安装步骤,可解决问题。自动link react-native link react-native-wechat 我这有问题。
Update 2:
https://github.com/facebook/react-native/releases
也许和 ”Fix react-native link issue when using multiple manifests (1ad08aa) - @dantman“ 这个bug 有关系。
I encountered the same problem
react-native link react-native-wechat didnt work
just manual link
null is not an object (evaluating 'WeChat.registerApp')
Most helpful comment