This Getting Started app shows how to set up a direct (1:1) chat using Chat SDK and React.
It comes with a pre-defined UI to showcase what the final product might look like.
This app is written using:
- PubNub Chat SDK
- TypeScript (v5.0.2)
- React (v18.2.0)
- Vite (v4.3.9)
To run the Getting Started app, make sure to have the following:
- yarn (>=1.22.19)
- Node.js (>=18.10.0)
- Code Editor (e.g. Visual Studio Code)
- PubNub Publish & Subscribe keys that you can obtain from Admin Portal after setting up an account. The autogenerated Demo Keyset in My First App on the Admin Portal already contains the configuration required to complete this guide (enabled App Context and selected region).
To run the app locally, follow the steps in the Getting Started guide.
The app shows these PubNub features:
- Direct (1:1) channel creation.
- User creation.
- Sending and receiving messages.
- Showing time indicator for published messages based on the PubNub timetoken.
Still, these are only some of the features available in Chat SDK. For the complete overview, check Chat SDK docs.