我想将Mixpanel与React Native集成在一起,我使用了这个github源https://github.com/davodesign84/react-native-mixpanel
我尝试了所有与描述相同的操作,但收到了此消息
Mixpanel.sharedInstanceWithToken is not a function
和'Mixpanel.sharedInstanceWithToken' is undefined)
var Mixpanel = require('react-native-mixpanel');
componentDidMount() {
console.log('============>', Mixpanel) // it returns object
Mixpanel.sharedInstanceWithToken('xxx');
}
我尝试了很多次都没有成功。应用程序成功启动,但在我使用Mixpanel.sharedInstanceWithToken('xxx')
的屏幕中停止谢谢。
我正在使用