![]() |
VOOZH | about |
React Native is an open-source framework by Meta (Facebook) for building native mobile apps using JavaScript and a single codebase.
Before starting with React Native development using Expo, ensure the following requirements are met:
Expo is a framework and platform built on top of React Native that simplifies building, running, and deploying apps across multiple platforms using a single codebase.
Open your terminal and run the command below.
npx create-expo-app app-name --templateNote: Replace the app-name with your app name for example : react-native-demo-app
Select the blank template to generate a minimal React Native project setup.
npx create-expo-app@latest project-nameResult of Method 1 and Method 2:
It completes the project creation and displays a message: "Your Project is ready!" as shown in the image below.
Go into the created folder and start the server by using the following command.
cd "project-name"Reset the project to the default boilerplate by running the command below.
npm run reset-projectTo start the react-native program, execute this command in the terminal of the project folder.
npx expo startThen, the application will display a QR code.
Output of Method 1:
Output of Method 2:
Example: We will render a text and put some style on the text, like text color and background color.
App.js | App/index.tsx:
Note: Whether you are using method 1 or method 2, you can use above code.
Output of Method 1:
Output of Method 2: