Using PubNub with React Native

前端 未结 3 1284
难免孤独
难免孤独 2021-01-18 18:50

Has anybody been able to integrate PubNub with React Native?

The PubNub support team told me to use the pubnub_browserify package and it should work. However when I

相关标签:
3条回答
  • 2021-01-18 19:23

    PubNub has a new Javascript SDK (v4). You should be able to add the dependency in your package.json file and import it in your code. Here's a quick example of an app that is subscribing to a PubNub channel.

    https://github.com/girishd/ReactPubNub

    0 讨论(0)
  • 2021-01-18 19:30

    I was able to integrate it. I used the standard javascript package. However, I did need to modify it a bit. Mostly to remove all the references to 'window' and to 'abort'. Once I removed those, I was good to go.

    0 讨论(0)
  • 2021-01-18 19:40

    Please try using https://www.npmjs.com/package/pubnub (version 3.7.16) (npm install pubnub) This version works with react-native

    0 讨论(0)
提交回复
热议问题