LiveKit LogoDocs

Quickstart Guides / Clients / React

React Quickstart

On this page

1. Install LiveKit SDK2. Join a room3. Create a backend server to generate tokens

1. Install LiveKit SDK

Install the LiveKit SDK:

yarn add livekit-client @livekit/components-react

2. Join a room

Note that this example hardcodes a token. In a real app, you’ll need your server to generate a token for you.

import { LiveKitRoom, VideoConference } from '@livekit/components-react';
const wsURL = "<wsURL>"
const token = "<token>"
export function App() {
return (
<LiveKitRoom token={token} serverUrl={wsURL} connect={true}>
<VideoConference />
</LiveKitRoom>
);
}

3. Create a backend server to generate tokens

Use our Server SDKs to create a backend server than generates tokens for your app at runtime:

Previous

Chevron IconNext.js
LiveKit logo

Product

SFU

SDKs

Performance

Deployment