Skip to main content

Installation

Yarn

yarn add @kesha-antonov/react-native-action-cable

npm

npm install @kesha-antonov/react-native-action-cable

The unscoped react-native-action-cable is an alias that re-exports this package in full and resolves to the latest release in the same major line. Use whichever name you prefer - the scoped one is the canonical package.

Create a consumer​

import { ActionCable, Cable } from '@kesha-antonov/react-native-action-cable'

const actionCable = ActionCable.createConsumer('ws://localhost:3000/cable')
const cable = new Cable({})

Continue with Quick start.