Using PubNub with React Native

蓝咒 提交于 2019-12-01 18:19:32

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.

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

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!