Talk to us
Talk to us

Blog Post

start building

How to Create React Native App [2023]

How to Create React Native App  [2023]

Are you ready to dive into the exciting world of mobile app development with React Native? Look no further! In this tutorial, we will provide a beginner’s guide to creating your first React Native app. With React Native, you can bring your web development skills to the world of native mobile apps, creating sleek and efficient applications for both Android and iOS.

No prior mobile development experience is necessary – just a solid understanding of JavaScript and React. Follow along with this tutorial to create React Native application. Let’s get started!

What Is React Native?

React Native is a powerful and cost-effective framework for building native mobile apps. It is a popular JavaScript framework that allows developers to build native mobile apps for Android and iOS platforms. Developed by Facebook in 2015, it has since become a go-to choice for many developers and organizations.

One major advantage of React Native is that it allows developers to use familiar tools and languages, such as JavaScript and React, to build native apps. This can be especially beneficial for those with a background in web development, as it simplifies the transition to mobile development.

react native

Why Should You Learn React Native

Are you considering learning React Native for your next mobile development project? Here are some of the reasons why it may be a good option:

  • Widely adopted by developers and organizations: React Native has been around since 2015 and has gained widespread adoption among developers and organizations around the world. This means that there is a large and active community of developers who can help you along the way and a wide range of resources available to learn from.
  • Build native apps using familiar tools: One of the major benefits of React Native is that it allows developers to build native mobile apps using familiar tools and languages like JavaScript and React. This means that developers with a background in web development can easily transition to building mobile apps, increasing efficiency and productivity.
  • Cost-effective solution: Building native mobile apps can be a time-consuming and expensive process. React Native offers a cost-effective solution as it allows developers to build native apps using a single codebase, which can be a significant time-saver.
  • Strong performance: React Native apps have strong performance and are comparable to native apps built using platform-specific languages. This means that you can build high-quality, performant apps using React Native.

How to Build Your First React Native App

Ready to take the plunge into the world of apps built with React Native? Great! Building your first React Native app can be a fun and rewarding experience.

In this tutorial, we will walk you through the process of setting up your development environment, creating a new project, writing code, testing your app, and debugging any issues that may arise. Whether you are a seasoned developer or just getting started, this tutorial will provide you with the foundation you need to build your first React Native app using ZEGOCLOUD API. So let’s get started!

Why ZEGOCLOUD API for React Native Apps

Are you looking for a solution to add video, voice, chat, and live streaming capabilities to your React Native app? Look no further than ZEGOCLOUD!

ZEGOCLOUD is a cloud-based platform that offers a range of tools and services for video chat, voice chat, app chat, and live streaming. With these tools, you can easily add real-time communication capabilities to your React Native app, whether it’s for one-on-one video calls, group video conferences, live streaming events, or in-app chat.

ZEGOCLOUD features

Here are the features of ZEGOCLOUD as a real-time communication provider:

  1. Video conferencing: ZEGOCLOUD offers a range of video conferencing tools, including support for one-on-one and group calls, screen sharing, and whiteboarding.
  2. Voice calls: The platform includes tools for high-quality voice calls, including support for call forwarding and voicemail.
  3. Chat: ZEGOCLOUD offers in-app chat capabilities, including support for group chat and messaging.
  4. Live streaming: The platform includes tools for live streaming, including support for real-time interactions and engagement.
  5. SDKs and APIs: ZEGOCLOUD offers SDKs and APIs for seamless integration of its real-time communication tools into your applications.
  6. Customization options: The platform includes a range of customization options, including the ability to customize branding and the user interface.

ZEGOCLOUD pricing: Looking for flexible billing options for your real-time communication needs? Look no further! Our pricing typically starts at $0.99 per 1000 minutes, but don’t miss out on our special offer – sign up now and get 10,000 free minutes every month.

How to Build React Native Apps With ZEGOCLOUD

Ready to start building your react native application for video chat with ZEGOCLOUD? Here’s how to get your app credentials:

Getting app credentials:

1. First, sign up for a ZEGOCLOUD developer account.

react native app

2. Once you’ve signed up, go to the ZEGOCLOUD admin console and create a new project.

create react native app

3. When creating your project, be sure to select the appropriate app use case – in this case, we recommend selecting “video and voice” for a video call app.

 react native application

4. Enter a name for your project, choose UIKit, and wait for the build process to complete.

react native apps
apps built with react native

5. Next, select the platform for your app – if you’re building a React Native app, be sure to choose that option.

react native app

6. Finally, copy your credentials from the project files. With these credentials, you’ll be ready to start integrating ZEGOCLOUD into your app.

create react native app

Creating a React Native app:

  1. Install Expo CLI
npm install -g expo-cli
  1. Create a new project
expo init video-call
  1. Install dependencies and start development server
cd video-call

expo start

Integrating and using ZEGOCLOUD:

  1. Install the package: You can install the package using either Yarn or npm. For Yarn, run the following command:
yarn add @zegocloud/zego-uikit-prebuilt-call-rn
For npm, run the following command:
npm install @zegocloud/zego-uikit-prebuilt-call-rn
  1. Install other dependencies: To ensure that @zegocloud/zego-uikit-prebuilt-call-rn can work properly, you will need to install some additional dependencies.
yarn add @zegocloud/zego-uikit-rn react-delegate-component zego-express-engine-reactnative
For npm, run the following command:
npm install @zegocloud/zego-uikit-rn react-delegate-component zego-express-engine-reactnative
  1. Locate the app.js file and add the following codes inside it, and replace the appID and appSign parameters with the credentials we got initially.
// App.js
import React, { Component } from 'react';
import ZegoUIKitPrebuiltCall, { ONE_ON_ONE_VIDEO_CALL_CONFIG } from '@zegocloud/zego-uikit-prebuilt-call-rn'

export default function VoiceCallPage(props) {
    return (
        <View style={styles.container}>
                userID={userID} // userID can be something like a phone number or the user id on your own user system. 
                callID={callID} // callID can be any unique string. 

                    // You can also use ONE_ON_ONE_VOICE_CALL_CONFIG/GROUP_VIDEO_CALL_CONFIG/GROUP_VOICE_CALL_CONFIG to make more types of calls.
                    onOnlySelfInRoom: () => { props.navigation.navigate('HomePage') },
                    onHangUp: () => { props.navigation.navigate('HomePage') },

Configure your project (Android):

  1. Add the following to the [project]/android/app/src/main/AndroidManifest.xml file:
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />
  1. Add the following to the[project]/android/app/ file:
-keep class **.zego.**  { *; }

Configure your project (iOS):

  1. Add the following to the [projec]t/ios/my project/Info.plistfile:
<string>We need to use the camera</string>
<string>We need to use the microphone</string>

Run a demo


Congratulations! You have successfully completed this tutorial on how to create a React Native app. You now have the skills and knowledge to build your own mobile apps using this powerful framework.

You can get started with building great real-time React Native applications with ZEGOCLOUD, by checking out our demo sample source code.

If the need for support and inquiries arises, please endeavor to reach out to our technical support team.

Read More

ZEGOCLOUD With our fully customizable and easy-to-integrate Live SDK, you can quickly build reliable, scalable, and interactive live streaming into your mobile, web, and desktop apps.

Related posts