[Mixpanel.sharedInstanceWithToken不是本机反应中的函数

问题描述 投票:2回答:1

我想将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');
    }

enter image description here

我尝试了很多次都没有成功。应用程序成功启动,但在我使用Mixpanel.sharedInstanceWithToken('xxx')

的屏幕中停止

谢谢。

react-native mixpanel pod
1个回答
0
投票

我正在使用

© www.soinside.com 2019 - 2024. All rights reserved.