kesha-antonov / react-native-action-cable

Use Rails 5+ ActionCable channels with React Native for realtime magic.
https://www.npmjs.com/package/@kesha-antonov/react-native-action-cable
MIT License
57 stars 24 forks source link

Unable to use the package #2

Closed vinay-webrmedia closed 4 years ago

vinay-webrmedia commented 5 years ago

After installing i followed the instruction and var actionCable = ActionCable.createConsumer('ws://localhost:3000/cable'); this line fails.

screenshot_2019-01-29-16-32-08-061_com gopher

kesha-antonov commented 5 years ago

@vinay-webrmedia Hey! Thanks for the reply. It's something with imports I'll check that

vinay-webrmedia commented 5 years ago

Thank you

On Wed 30 Jan, 2019, 3:44 PM Kesha Antonov <notifications@github.com wrote:

@vinay-webrmedia https://github.com/vinay-webrmedia Hey! Thanks for the reply. It's something with imports I'll check that

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kesha-antonov/react-native-action-cable/issues/2#issuecomment-458888329, or mute the thread https://github.com/notifications/unsubscribe-auth/AR3rgPXd1wE6cUIpet178kSbUz0s7drtks5vIXB_gaJpZM4aX0lY .

kesha-antonov commented 5 years ago

@vinay-webrmedia I've updated Readme - how to use import https://github.com/kesha-antonov/react-native-action-cable/blob/master/README.md#usage Check it please

Do you use the same?

AhmedAliIbrahim commented 5 years ago

Docs isn't clear enough about how we should use this package .

i added this var cable = new Cable({ ChatChannel: actionCable.subscriptions.create({channel: 'ChatChannel', room: 'example_room'}, ['newMessage']) }); but still don't know where is the callback for receiving new messages

kesha-antonov commented 5 years ago

@AhmedAliIbrahim Hey! Thanks for the feedback I'll rewrite Readme to make it clear how to use it

AhmedAliIbrahim commented 5 years ago

@kesha-antonov any updates about Readme ?

kesha-antonov commented 5 years ago

Hey guys! Sorry for the delay Will do on the next week

kesha-antonov commented 5 years ago

Hey guys!

@vinay-webrmedia @AhmedAliIbrahim

I updated Readme and uploaded new version to npm.

Please check

AhmedAliIbrahim commented 4 years ago

@kesha-antonov Thanks a lot, it's now much better