React Native ActionCable
Use Rails ActionCable channels with React Native for real-time WebSocket communication.
- 🔌 WebSocket Connection - Automatic connection management with reconnection support
- 📡 Channel Subscriptions - Subscribe to multiple ActionCable channels; a broadcast with an
action(saytyping) arrives as its own event,channel.on('typing') - 🔄 Auto-Reconnect - Reconnects when the connection drops and when the app comes back from the background, then tells you with
connected({ reconnected: true })so you can fetch what you missed - 🔐 Custom Headers - Support for authentication and dynamic headers
- 📱 React Native Ready - Works without
windowobject polyfills, on the New Architecture (pure JS, no native module) - 🛡️ Connection Reuse - Prevent duplicate connections during hot reloads
- ⚡ TypeScript - Full TypeScript support included
Installation
yarn add @kesha-antonov/react-native-action-cable
npm install @kesha-antonov/react-native-action-cable
More in Installation.