live-events
is an app that simulates live events. You can switch between multiple channels, send messages, view channel occupancy and the participant list. The app comes with the light and dark themes.
This application uses React v18.0.0, ReactDOM v18.0.0, PubNub JavaScript SDK v7.2.0, and PubNub React SDK v3.0.1.
To use the app, you need:
- yarn
- Node.js
- Code editor (e.g. Visual Studio Code)
- PubNub account on the Admin Portal with Publish and Subscribe Keys for your chat app with the default configuration.
Read the tutorial to learn how to use the app and better understand the logic behind it.
Follow the steps to run the app locally.
-
Clone the repository.
git clone https://github.com/pubnub/react-chat-components.git
-
Install the dependencies.
yarn
-
Copy the
samples/.env.example
file assamples/.env
and paste your Publish and Subscribe Keys there. -
Go to the
samples/react/live-events
folder.cd samples/react/live-events
-
Run the application.
yarn run start
The live-events
app showcases these PubNub Chat Components for React: