This demo runs the same React Native chat app in two emulators in your browser: an Android Pixel 7 and an iPhone 14 Pro. It is the group chat sample app for the PubNub Chat SDK for JavaScript and TypeScript. Choose a different user ID on each phone and log in. Then start a chat and watch messages, typing, and reactions appear on the other phone.
The Chat SDK handles all of it. Users, channels, and memberships are stored in App Context, and each conversation loads its earlier messages from Message Persistence when you open it. The home screen sorts your conversations into unread, public channels, groups, and direct messages, and shows how many messages you missed. A dot on the avatar shows whether a user was active recently. You can also edit, delete, and restore messages, add links, and change your name on the Profile tab. The source code is on GitHub.