How to create a React Native app with Expo
October 24, 2023
Expo provides a streamlined environment for building React Native apps. This guide covers the essentials: initializing a new Expo project, directory structure, development, and deployment.
Initialize a new Expo project
First, install the Expo CLI.
Now, initialize a new project.
Choose a template when prompted. You usually start with the "blank" template for a minimal setup.
Understanding the directory structure
After initialization, you'll get a directory structure like this:
assets/: Store your images, fonts, and other assets here.
App.js: Your main application file.
app.json: Contains configuration settings.
package.json: Lists your dependencies.
Running the development server
Start the development server with:
A QR code appears in your terminal. Scan it with the Expo Go app on your phone to see your project live.
You can use npm or yarn for package management.
Using native modules
If you need to eject from Expo for more control over native modules, you can run:
Use the built-in Expo DevTools for debugging. You can access them at
http://localhost:19002/ when your development server is running.
Building for production
After building, you can publish updates to your app using:
Leveraging Basedash for team collaboration
For apps that heavily rely on backend data, a platform like Basedash can streamline your workflow. It generates an admin panel for your SQL database, allowing you to easily share access with your team and manage data. Basedash also supports running and sharing SQL queries, so it can act as a central hub for data manipulation and visualization, especially helpful for apps under active development.