<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Emmanuel Ezeigbo</title>
    <description>The latest articles on DEV Community by Emmanuel Ezeigbo (@zgbocode).</description>
    <link>https://dev.to/zgbocode</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1693846%2F6cfbc465-c263-4732-9d0d-66c37383af2f.png</url>
      <title>DEV Community: Emmanuel Ezeigbo</title>
      <link>https://dev.to/zgbocode</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zgbocode"/>
    <language>en</language>
    <item>
      <title>How to Build a Live Streaming App using ZEGOCLOUD in React.js</title>
      <dc:creator>Emmanuel Ezeigbo</dc:creator>
      <pubDate>Fri, 28 Mar 2025 06:02:28 +0000</pubDate>
      <link>https://dev.to/zgbocode/how-to-build-a-live-streaming-app-using-zegocloud-in-reactjs-2l0f</link>
      <guid>https://dev.to/zgbocode/how-to-build-a-live-streaming-app-using-zegocloud-in-reactjs-2l0f</guid>
      <description>&lt;p&gt;Live streaming has exploded in popularity — from gaming and concerts to webinars and social media. If you’ve ever wanted to build your own live streaming platform, now’s your chance.&lt;/p&gt;

&lt;p&gt;In this guide, I’ll walk you through creating a fully functional live streaming app using ZEGOCLOUD’s SDK in React.js. By the end, you’ll have a working app where hosts can stream, co-hosts can join, and audiences can watch — all in real time.&lt;/p&gt;

&lt;p&gt;No prior streaming experience? No problem. I’ll break it down step by step.&lt;/p&gt;

&lt;h2&gt;
  
  
  What You’ll Need
&lt;/h2&gt;

&lt;p&gt;Before coding, make sure you have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Node.js installed (Download from &lt;a href="https://nodejs.org/" rel="noopener noreferrer"&gt;https://nodejs.org/&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;A ZEGOCLOUD account (Free sign-up &lt;a href="https://zegocloud.com/" rel="noopener noreferrer"&gt;https://zegocloud.com/&lt;/a&gt; )&lt;/li&gt;
&lt;li&gt;Basic React knowledge (You don’t need to be an expert)
Got everything? Great. Let’s move on.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 1: Set Up Your ZEGOCLOUD Account
&lt;/h2&gt;

&lt;p&gt;ZEGOCLOUD provides the backend infrastructure for real-time streaming. Here’s how to get started:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to &lt;a href="https://zegocloud.com/" rel="noopener noreferrer"&gt;https://zegocloud.com/&lt;/a&gt; and sign up.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You’ll get 10,000 free minutes (more than enough for testing).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnnw90ylhrkintkd02o9t.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnnw90ylhrkintkd02o9t.jpg" alt="Image description" width="800" height="377"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a new project in the dashboard.&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Choose “Live Streaming” as your use case.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzfekkymx99ajj4kd8rl7.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzfekkymx99ajj4kd8rl7.jpg" alt="Image description" width="800" height="379"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8vatftpyjy91i68x8ga3.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8vatftpyjy91i68x8ga3.jpg" alt="Image description" width="800" height="379"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Scroll down, click Next.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Note your App ID and Server Secret.&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;You’ll need these later to connect your React app.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0f37nqfn7yhnw0ds1fds.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0f37nqfn7yhnw0ds1fds.jpg" alt="Image description" width="800" height="377"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Set Up Your React Project
&lt;/h2&gt;

&lt;p&gt;We’ll use Vite for a faster setup than Create React App.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open your terminal and run:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx create vite@latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj2dg6myduvlknj9yifhj.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj2dg6myduvlknj9yifhj.jpg" alt="Image description" width="560" height="425"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Move into your project folder:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd my-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Install dependencies:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Add ZEGOCLOUD’s SDK:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install @zegocloud/zego-uikit-prebuilt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Start the development server:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Press Ctrl + Click the link to open your app in the browser.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhuo9l8emz7sbebmazerx.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhuo9l8emz7sbebmazerx.jpg" alt="Image description" width="533" height="386"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Your React project is now running!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzs20emipuh9ml4f5ytn7.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzs20emipuh9ml4f5ytn7.jpg" alt="Image description" width="800" height="486"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Get Your ZEGOCLOUD Credentials
&lt;/h2&gt;

&lt;p&gt;Remember the App ID and Server Secret from earlier?&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Go back to your ZEGOCLOUD Console.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Find your project and copy the credentials.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Keep them secure — they authenticate your app with ZEGOCLOUD’s servers.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 4: Implement the Live Streaming Feature
&lt;/h2&gt;

&lt;p&gt;Now, the exciting part — building the live stream!&lt;/p&gt;

&lt;p&gt;Replace the code in App.jsx with this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import * as React from 'react';
import { ZegoUIKitPrebuilt } from '@zegocloud/zego-uikit-prebuilt';

function randomID(len) {
  let result = '';
  if (result) return result;
  var chars = '12345qwertyuiopasdfgh67890jklmnbvcxzMNBVCZXASDQWERTYHGFUIOLKJP',
    maxPos = chars.length,
    i;
  len = len || 5;
  for (i = 0; i &amp;lt; len; i++) {
    result += chars.charAt(Math.floor(Math.random() * maxPos));
  }
  return result;
}

export function getUrlParams(
  url = window.location.href
) {
  let urlStr = url.split('?')[1];
  return new URLSearchParams(urlStr);
}

export default function App() {
  const roomID = getUrlParams().get('roomID') || randomID(5);
  let role_str = getUrlParams(window.location.href).get('role') || 'Host';
  const role =
    role_str === 'Host'
      ? ZegoUIKitPrebuilt.Host
      : role_str === 'Cohost'
      ? ZegoUIKitPrebuilt.Cohost
      : ZegoUIKitPrebuilt.Audience;

  let sharedLinks = [];
  if (role === ZegoUIKitPrebuilt.Host || role === ZegoUIKitPrebuilt.Cohost) {
    sharedLinks.push({
      name: 'Join as co-host',
      url:
        window.location.protocol + '//' + 
        window.location.host + window.location.pathname +
        '?roomID=' +
        roomID +
        '&amp;amp;role=Cohost',
    });
  }
  sharedLinks.push({
    name: 'Join as audience',
    url:
     window.location.protocol + '//' + 
     window.location.host + window.location.pathname +
      '?roomID=' +
      roomID +
      '&amp;amp;role=Audience',
  });
 // generate Kit Token
  const appID = YOUR_APP_ID;
  const serverSecret = "YOUR_APP_SECRET";
  const kitToken =  ZegoUIKitPrebuilt.generateKitTokenForTest(appID, serverSecret, roomID,  randomID(5),  randomID(5));


  // start the call
  let myMeeting = async (element) =&amp;gt; {
      // Create instance object from Kit Token.
      const zp = ZegoUIKitPrebuilt.create(kitToken);
      // start the call
      zp.joinRoom({
        container: element,
        scenario: {
          mode: ZegoUIKitPrebuilt.LiveStreaming,
          config: {
            role,
          },
        },
        sharedLinks,
      });
  };

  return (
    &amp;lt;div
      className="myCallContainer"
      ref={myMeeting}
      style={{ width: '100vw', height: '100vh' }}
    &amp;gt;&amp;lt;/div&amp;gt;
  );
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Key Features of This Code:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Random Room ID Generation — Each stream gets a unique ID.&lt;/li&gt;
&lt;li&gt;Role-Based Access — Host, Cohost, and Audience have different permissions.&lt;/li&gt;
&lt;li&gt;Shareable Links — Viewers can join via generated URLs.&lt;/li&gt;
&lt;li&gt;Built-In UI Controls — ZEGOCLOUD handles camera, mic, and screen sharing.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 5: Test Your Live Streaming App
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Replace YOUR_APP_ID and YOUR_SERVER_SECRET with your actual credentials.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run the app:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Open two browser tabs:&lt;/li&gt;
&lt;li&gt;One as Host (default)&lt;/li&gt;
&lt;li&gt;&lt;p&gt;One as Audience (use the shared link)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Start streaming!&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flll3je2e0j5xgxp6py8v.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flll3je2e0j5xgxp6py8v.jpg" alt="Image description" width="800" height="479"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You should now see:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Host view (with camera/mic controls)&lt;/li&gt;
&lt;li&gt;Audience view (watch-only mode)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F376ynq77vxwfqmqmt0ni.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F376ynq77vxwfqmqmt0ni.jpg" alt="Image description" width="800" height="485"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Next Steps: Customize &amp;amp; Improve
&lt;/h2&gt;

&lt;p&gt;Want to make this even better? Try these upgrades:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Custom UI — Style the player to match your brand.&lt;/li&gt;
&lt;li&gt;Recording — Save streams for later viewing.&lt;/li&gt;
&lt;li&gt;Monetization — Add subscriptions or donations.&lt;/li&gt;
&lt;li&gt;Moderation — Kick users or restrict chats.
ZEGOCLOUD’s docs (&lt;a href="https://www.zegocloud.com/docs" rel="noopener noreferrer"&gt;https://www.zegocloud.com/docs&lt;/a&gt;) have everything you need to expand your app.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;You’ve just built a professional live streaming app in React with ZEGOCLOUD’s SDK. No complex server setup, no fuss — just a working live stream in minutes.&lt;/p&gt;

&lt;p&gt;What will you create with it? A gaming platform? A webinar tool? The possibilities are endless.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>react</category>
    </item>
    <item>
      <title>How to Build a Video Call Application using ZEGOCLOUD SDK in React.js</title>
      <dc:creator>Emmanuel Ezeigbo</dc:creator>
      <pubDate>Fri, 21 Mar 2025 04:38:17 +0000</pubDate>
      <link>https://dev.to/zgbocode/how-to-build-a-video-call-application-using-zegocloud-sdk-in-reactjs-5c40</link>
      <guid>https://dev.to/zgbocode/how-to-build-a-video-call-application-using-zegocloud-sdk-in-reactjs-5c40</guid>
      <description>&lt;p&gt;In this tutorial, we're going to build a fully functional video call application using the ZEGOCLOUD SDK in React.js. If you've ever wondered how apps like Zoom or Google Meet handle video calls so seamlessly, you're in the right place. ZEGOCLOUD provides powerful, developer-friendly UIKits that make integrating real-time communication features a breeze. And the best part? We'll have this up and running in just a few steps!&lt;br&gt;
By the end of this guide, you'll have a working video call app that you can share with friends, colleagues, or even use for your next virtual meeting. Let's get started!&lt;/p&gt;
&lt;h2&gt;
  
  
  Setting Up Your ZEGOCLOUD Account
&lt;/h2&gt;

&lt;p&gt;First things first, you'll need a ZEGOCLOUD account. Head over to &lt;a href="https://zegocloud.com" rel="noopener noreferrer"&gt;https://zegocloud.com&lt;/a&gt; and either log in or sign up if you're new. Signing up is quick, and you'll get 10,000 free minutes to use for your video call applications. That's more than enough to build and test your app without worrying about costs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx2o1kr80f09ftvo7znk0.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx2o1kr80f09ftvo7znk0.jpg" alt="Image description" width="800" height="377"&gt;&lt;/a&gt;&lt;br&gt;
Once you're logged in, you'll land on the ZEGOCLOUD Console. This is where you'll manage your projects, access your API credentials, and explore all the cool communication solutions ZEGOCLOUD has to offer. Take a moment to familiarize yourself with the dashboard - it's your command center for everything video call-related.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnc03nw5gb79hba2em48a.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnc03nw5gb79hba2em48a.jpg" alt="Image description" width="800" height="379"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Before we get into coding, let's make sure you have everything you need:&lt;/li&gt;
&lt;li&gt;Node.js installed on your machine. If you don't have it yet, grab it from nodejs.org.&lt;/li&gt;
&lt;li&gt;A ZEGOCLOUD account (which you just set up - nice work!).&lt;/li&gt;
&lt;li&gt;Basic knowledge of React and JavaScript. If you're new to React, don't sweat it! This tutorial is beginner-friendly, and I'll walk you through every step.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Step 1: Set Up the React Project
&lt;/h2&gt;

&lt;p&gt;We'll use Vite to create our React project. Vite is fast, lightweight, and perfect for modern web development. If you haven't used it before, you're in for a treat.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open your terminal and run the following command to create a new React project:
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx create-vite@latest video-call-app --template react
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm2ygrkcu8xomszkr545s.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm2ygrkcu8xomszkr545s.jpg" alt="Image description" width="711" height="202"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go into your project folder:
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd video-call-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;Install the project dependencies:
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv7iacoenn7181rjp14ev.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv7iacoenn7181rjp14ev.jpg" alt="Image description" width="491" height="160"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Now, let's add the ZEGOCLOUD SDK package:
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm i @zegocloud/zego-uikit-prebuilt --save
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;Once everything is installed, start your development server:
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuwgd6k9j3jnhrsf4ftvd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuwgd6k9j3jnhrsf4ftvd.jpg" alt="Image description" width="533" height="213"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Press Ctrl + Click on the link in your terminal to open the app in your browser.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F72uvft5zziwc6qwfrebz.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F72uvft5zziwc6qwfrebz.jpg" alt="Image description" width="800" height="402"&gt;&lt;/a&gt;&lt;br&gt;
And just like that, your React project is up and running! Now, let's add the magic - video call functionality.&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 2: Get Your ZEGOCLOUD Credentials
&lt;/h2&gt;

&lt;p&gt;To connect your app to ZEGOCLOUD's services, you'll need two things: your App ID and App Sign. Here's how to get them:&lt;br&gt;
Go to your ZEGOCLOUD Console.&lt;br&gt;
Create a new project. You'll be asked what kind of app you're building - choose Video Call and click Next.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1k9u1ge9c7vvb7pj5rzd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1k9u1ge9c7vvb7pj5rzd.jpg" alt="Image description" width="800" height="378"&gt;&lt;/a&gt;&lt;br&gt;
Once your project is created, you'll be redirected to a dashboard where you can find your App ID and App Sign. Keep these credentials handy; we'll need them in the next step.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzx4cndnjct4ne5b3syji.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzx4cndnjct4ne5b3syji.jpg" alt="Image description" width="800" height="376"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 3: Implement the Video Call Feature
&lt;/h2&gt;

&lt;p&gt;Now for the fun part - adding the video call functionality! Open your App.jsx file and replace its content with the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import * as React from 'react';
import { ZegoUIKitPrebuilt } from '@zegocloud/zego-uikit-prebuilt';

function randomID(len) {
  let result = '';
  if (result) return result;
  var chars = '12345qwertyuiopasdfgh67890jklmnbvcxzMNBVCZXASDQWERTYHGFUIOLKJP',
    maxPos = chars.length,
    i;
  len = len || 5;
  for (i = 0; i &amp;lt; len; i++) {
    result += chars.charAt(Math.floor(Math.random() * maxPos));
  }
  return result;
}
export function getUrlParams(
  url = window.location.href
) {
  let urlStr = url.split('?')[1];
  return new URLSearchParams(urlStr);
}
export default function App() {
      const roomID = getUrlParams().get('roomID') || randomID(5);
      let myMeeting = async (element) =&amp;gt; {
     // generate Kit Token
      const appID = YOUR_APP_ID;
      const serverSecret = "YOUR_SERVER_SECRET";
      const kitToken =  ZegoUIKitPrebuilt.generateKitTokenForTest(appID, serverSecret, roomID,  randomID(5),  randomID(5));

     // Create instance object from Kit Token.
      const zp = ZegoUIKitPrebuilt.create(kitToken);
      // start the call
      zp.joinRoom({
        container: element,
        sharedLinks: [
          {
            name: 'Personal link',
            url:
             window.location.protocol + '//' + 
             window.location.host + window.location.pathname +
              '?roomID=' +
              roomID,
          },
        ],
        scenario: {
          mode: ZegoUIKitPrebuilt.GroupCall, // To implement 1-on-1 calls, modify the parameter here to [ZegoUIKitPrebuilt.OneONoneCall].
        },
      });

  };
  return (
    &amp;lt;div
      className="myCallContainer"
      ref={myMeeting}
      style={{ width: '100vw', height: '100vh' }}
    &amp;gt;&amp;lt;/div&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace &lt;code&gt;YOUR_APP_ID&lt;/code&gt; and &lt;code&gt;YOUR_SERVER_SECRET&lt;/code&gt; with the credentials you got from the ZEGOCLOUD Console. Save the file, refresh your browser, and voilà-your video call app is live!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fye4gq0ko569nlr7pjjrv.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fye4gq0ko569nlr7pjjrv.jpg" alt="Image description" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;And there you have it - a fully functional video call app built with ZEGOCLOUD SDK in React.js! In just a few steps, you've integrated real-time video communication into your app, thanks to ZEGOCLOUD's intuitive tools. Whether you're building a video conferencing app, a virtual classroom, or just experimenting with real-time communication, ZEGOCLOUD makes it easy.&lt;br&gt;
But don't stop here! ZEGOCLOUD's SDK offers tons of other features like live streaming, voice calls, and messaging. You can customize your app, add new features, or even integrate it into a larger project. The possibilities are endless.&lt;br&gt;
So, what's next? Share your app with friends, test it out, and start building the future of real-time communication. And if you run into any questions, ZEGOCLOUD's documentation and community are great resources to lean on.&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
    </item>
    <item>
      <title>React vs Angular: In My Opinion (IMO)</title>
      <dc:creator>Emmanuel Ezeigbo</dc:creator>
      <pubDate>Thu, 27 Jun 2024 13:35:22 +0000</pubDate>
      <link>https://dev.to/zgbocode/react-vs-angular-in-my-opinion-imo-b8k</link>
      <guid>https://dev.to/zgbocode/react-vs-angular-in-my-opinion-imo-b8k</guid>
      <description>&lt;p&gt;Two of the most prominent contenders of the Javascript ecosystem are React.js and Angular. Having dabbled in both, I'd like to share my perspective on their strengths and weaknesses, along with my excitement about using React.js at the &lt;a href="https://hng.tech/internship"&gt;HNG Internship&lt;/a&gt; program.&lt;/p&gt;

&lt;h2&gt;
  
  
  React vs Angular
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Library vs Framework:&lt;/strong&gt; At its core, React.js is a JavaScript library focused on building user interfaces (UI) with reusable components. Angular, on the other hand, is a full-fledged framework offering a more comprehensive set of tools for building complex web applications.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Learning Curve:&lt;/strong&gt; React's simplicity and focus on components make it easier to learn, especially for beginners. Angular, with its built-in features and steeper learning curve, might take longer to master.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Binding:&lt;/strong&gt; React utilizes a one-way data binding approach, giving you more control over data flow. Angular's two-way data binding streamlines development but can sometimes lead to unexpected behavior.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performance:&lt;/strong&gt; React's virtual DOM ensures efficient rendering updates, making it generally faster than Angular.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkeea76sbv3ibjar1l0ya.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkeea76sbv3ibjar1l0ya.png" alt="Confused" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  My Experience with React.js
&lt;/h2&gt;

&lt;p&gt;I've found React.js to be a joy to work with. Its component-based architecture promotes code reusability and maintainability. The vast community and extensive ecosystem of libraries provide solutions for almost any need. This flexibility allows for a more customized development experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  HNG Internship
&lt;/h2&gt;

&lt;p&gt;I'm happy to be participating in the HNG Internship Program using React.js. The program's focus on this in-demand library aligns perfectly with my development goals. I expect to hone my React skills, collaborate with talented developers, and contribute to a real-world project.&lt;br&gt;
While both React.js and Angular are excellent tools, React's focus on simplicity, performance, and a thriving community makes it a perfect fit for me. Also if you're a company looking to hire talented developers, check out the HNG hiring platform here: &lt;a href="https://hng.tech/hire"&gt;https://hng.tech/hire&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
