Back to blog

New Dyte Video SDK 2.0 for React with Seamless Voice & Video Calling

New Dyte Video SDK 2.0 for React with Seamless Voice & Video Calling

React has its own unique design patterns, there is a certain style to how developers build on React, from the lifecycle of components to the functional programming paradigms of hooks.

So when it comes to adding live video/audio experiences within an App, a developer should not need to move away from these abstractions. Developing video calling applications shouldn’t be full of glue code mapping a library made with other design patterns to React’s patterns.

That is why we are launching two SDKs targeted specifically for React.

  • React Web Core
  • React UI Kit

Flux-like Design Pattern

Flux-like Design Pattern with Dyte SDK

Flux is an architectural pattern proposed by Facebook for building React apps. The pattern describes a  unidirectional data flow and has the following components

  • Store
  • Dispatcher/Actions
  • Views

To implement this pattern our SDK exposes two hooks

1. useDyteMeeting

const { meeting } = useDyteMeeting();
Create Dyte Meeting using React Hooks code block

All the actions that you need to take in a meeting, would be executed on this object

// To mute
// To unmute
Enable or Disable audio code block

2. useDyteSelector  

All the meeting state is managed by one central store, to consume the data we provide the following hook

const audioEnabled = useDyteSelector((meeting) => meeting.self.audioEnabled);
Dyte Selector Hook for Audio Enabled code block

If you have ever used redux, this should feel right at home. useDyteSelector will only cause a re-render when the data is updated. For example

// the below hook will not cause the component to re-render
const videoEnabled = useDyteSelector((meeting) => meeting.self.videoEnabled);
Dyte Selector Hook for Audio Enabled code block
React Hooks in Dyte SDK

You can also take action on the changes in these data

const { meeting } = useDyteMeeting();
const roomJoined = useDyteSelector((m) => m.self.roomJoined);
useEffect(() => {
	if(roomJoined) {`Hello`);

You can also listen to events the regular way using event listeners

useEffect(() => {
    const onJoin = (p) => {
        console.log(`${} joined`);
		meeting.participants.joined.on('participantJoin', onJoin);
    return () => meeting.participants.joined.removeListener(onJoin);

For these hooks to work they need a parent Context Provider

function App() {
  const [ client, initClient ] = useDyteClient();

  useEffect(() => {
  }, []);

  return (
    <DyteProvider value={client}>
      <YourMeetingComponent />

For more information read our docs

Now how do you build User Interfaces with this SDK?

React UI Kit

In case you missed our last blog on the UI Kit, read it here

Atomic Design in Dyte SDK 

Our React UI Kit works seamlessly with the core objects. While our default UI is one line of code

<DyteMeeting meeting={meeting} />
Dyte Meeting Object code block

With just a few more lines of code, you can customise it however you want, for example, if you want your participant tile to have a google meet style pin button on hover, you can make your own tile in 10 lines of code.

function ParticipantTile({ children, participant, size, }: any) {
    return (
        <DyteParticipantTile participant={participant} size={size} {}>
            <DyteAvatar participant={participant} size={size} />
            <DyteNameTag participant={participant} size={size}>
            <DyteAudioVisualizer participant={participant} size={size} />
            <button className="pin-btn" onClick={() =>}>
                <PinIcon />
Participant Tile Code Block

And use it with objects from useDyteSelector

const self = useDyteSelector((meeting) => meeting.self);

return (<ParticipantTile participant={self} id="self-tile" size="sm" />);
Dyte Selector Code Block
Customized Dyte Meeting

Powerful, Customizable and Easy to Use

Read more about our React Core SDK and React UI Kit at

If you haven’t heard about Dyte yet, head over to to learn how we are revolutionizing live video calling through our SDKs and libraries and how you can get started quickly on your 10,000 free minutes which renew every month. If you have any questions, you can reach us at or ask our developer community.

Great! Next, complete checkout for full access to Dyte.
Welcome back! You've successfully signed in.
You've successfully subscribed to Dyte.
Success! Your account is fully activated, you now have access to all content.
Success! Your billing info has been updated.
Your billing was not updated.