Getting started: Pub/Sub with React Native

This guide will get you started with Ably Pub/Sub in a new React Native application built with Expo.

You'll establish a realtime connection to Ably and learn to publish and subscribe to messages. You'll also implement presence to track other online clients, and learn how to retrieve message history.

Screenshot of the completed React Native Pub/Sub application showing a web interface with connection status, a message input field, realtime message display, and a presence indicator showing online users. The interface demonstrates the key features you'll build including publishing messages, subscribing to receive messages in realtime, and tracking which clients are currently present in the channel.

Prerequisites

  1. Sign up for a free Ably account.
  2. Create a new app, and create your first API key in the