消息关闭
    暂无新消息!

在RN项目中使用第三方插件react-native-wechat
参考文档:https://github.com/weflex/rea...

按照官方文档配置完成后会在执行到应用注册时报错

compinentDidMount(){
    WeChat.registerApp('应用ID');
}

错误如图所示:

希望知道'_reactNativeWechat2.default.registerApp'中_reactNativeWechat2是什么鬼?怎么解决?谢谢大家


2个回答

︿ 0

registerApp(appid)

You should call this function in global, calling over twice would throw an error.

// If you register here
componentDidMount (){
wechat.registerApp('your appid')
}
{String} appid the appid you get from WeChat dashboard
returns {Promise}

填写回调的promise 看看