Building React Native apps with Expo



tải về 17.87 Kb.
Chuyển đổi dữ liệu29.06.2023
Kích17.87 Kb.
#54916
1-Building React Native apps with Expo


Building React Native apps with Expo
Previously, you learned what Expo is and evaluated its pros and cons. By the end of this reading, you’ll know how to install and set up Expo so that you can start building React Native applications.
Revisit 'React Native with Expo' to refresh your memory on how to install Expo.
Installation
The first step is to install a bare minimum React Native project using the create-expo-app command as follows:
npx create-expo-app FirstProject
cd FirstProject
npm start

You can give your project any name you like. In this example, it is named FirstProject. Note that instead of npm start, you can also use npx expo start.


If you would like to use yarn as your package manager rather than npm, then you can run the following commands instead:
yarn create expo-app FirstProject
cd FirstProject
yarn start

Instead of yarn start, you can also use yarn expo start. This will immediately start the development server on your local machine.


Expo Go
Once the installation is complete, you can run the React Native app, either on an emulator or on your physical mobile device.
You then install the Expo Go app on your iOS or Android device. Then you connect it to the same wireless network as your computer. Once this step is complete, you scan the QR code from your terminal to open the project.
You will notice changes on the mobile app as soon as you start developing your React Native app. Note that this is a barebones setup that does not require you to install native development software for iOS or Android.
For a more detailed guide on the installation and setup procedure for Expo, check out the Additional Resources item: First steps - Expo Documentation


Source: Meta

tải về 17.87 Kb.

Chia sẻ với bạn bè của bạn:




Cơ sở dữ liệu được bảo vệ bởi bản quyền ©hocday.com 2024
được sử dụng cho việc quản lý

    Quê hương