cpunion / react-actioncable-provider

MIT License
154 stars 60 forks source link

document is not defined on React Native #24

Open danieljgp2 opened 5 years ago

danieljgp2 commented 5 years ago

Hello im currently working on a React Native application and i'm getting this error.

Captura de pantalla 2019-03-23 a la(s) 23 12 59

I already try

import ActionCable from 'actioncable';
const cable = ActionCable.createConsumer('ws://test.example.com/cable');
<ActionCableProvider cable={cable}>...</ActionCableProvider>;

like the documentation says https://github.com/cpunion/react-native-actioncable#use-with-react-actioncable-provider but i still getting the same error.

I'm currently using react-native-actioncable but likes the documentation says, is now unmaintained

Rana-Muhammad-Amir commented 4 years ago

@danieljgp2 Any update regarding this....? i am also facing this issue on react-native @cpunion please guide

danieljgp2 commented 4 years ago

@Rana-Muhammad-Amir No, i was using the deprecated version cause was the only one that works fro me but i quit from this library.

amorimlucas commented 4 years ago

@danieljgp2 Did you find a better library?

awahab94 commented 4 years ago

@danieljgp2 Anything you found please share here that would be helpfull

danieljgp2 commented 4 years ago

@amorimlucas @abdulwahabcs im not using ActionCable anymore, im using FCM as background messages to handle any realtime event, you can take this as an approach otherwise use a pub/sub