Rails ActionCable and React Native
I'm working on a companion React Native app to accompany my RoR webapp, and want to build a chat feature using ActionCable (websockets). I cannot get my React Native app to talk to ActionCable. I have tried a number of libraries including react-native-actioncable with no luck. The initial connection seems to be working (I know this because I was having errors before and they've since gone away when I passed the proper params). This is an abbreviated version of my React Native code: import ActionCable from 'react-native-actioncable' class Secured extends Component { componentWillMount () { var url = 'https://x.herokuapp.com/cable/?authToken=' + this.props.token + '&client=' + this.props.client + '&uid=' + this.props.uid + '&expiry=' + this.props.expiry const cable = ActionCable.createConsumer(url) cable.subscriptions.create('inbox_channel_1', { received: function (data) { console....