"If you’ve ever wanted to put Solana in the palm of your hand, this tutorial is for you".
We’ll be building a decentralized mobile app (dApp) using React Native + Expo CLI, where users can:
- Log in with their Solana wallet
- Receive and send SOL
- Sign messages
- View their wallet balance in real time
The goal is to keep things practical and beginner-friendly, so even if you’re new to Solana dApp development using React Native, you’ll be able to follow along. By the end, you’ll have a working mobile dApp that runs directly on your physical device or virtual device using a development build generated locally or using eas.
Let’s dive in and start building Web3 experiences that actually fit in your pocket.
Prerequisites:
- node.js
- Android Studio
- Code editor vscode
- Basic knowledge of expo
1️⃣ Project Setup: To create a new project, run the following command
npm create solana-dapp@latest
Select the solana mobile template
Select any one of your choice; I'll be going with the web3js-expo
After the template is done cloning; in your terminal, type:
cd [project-name]
install all packages
yarn install
2️⃣ Generate development Build:
There are two ways of generating a development build:
- Using eas
- Local build on your machine
Using eas to generate a development build is the easiest way, but when using free tier on eas, there's limit to the number of builds you can generate monthly, and with time, your build waits in queue for up to 3 hours before building starts. So with this I'll be showing you how to generate development build locally, which takes a bit longer process than eas, but faster!
Building locally on your laptop can work if you are using either a virtual device from android studio or your physical device.
To get started, open your project on your terminal, and type:
npx expo install expo-dev-client
Next is to generate your native android folder, but before doing this , make whatever changes you want to make to the app settings in the app.json file, then type
npx expo prebuild
Now your android folder has been generated!
Open your android studio, click more options, click sdk manager
Ensure the ticked sdk tools below are installed (latest version) on your android studio
Create a Virtual device under the virtual device manager (if you want to use virtual device to simulate your development build)
If you are using your physical device instead, connect your phone to your laptop using USB device, and make sure you have android debugging enabled.
Head over to your code editor, and check if you have your device connected (this works for both physical and virtual device), open the terminal and type:
adb devices
The output should be similar to this:
Ensure your physical device is connected through out the process
Finally, in your terminal, type:
npx expo run:android
And watch it run, install to your device and open the application.
And that’s it, you’ve just built a fully functional Solana mobile dApp with React Native and Expo.
With the development client, you can:
- Connect and authenticate with a Solana wallet
- View balances in real time
- Send and receive SOL
- Sign messages securely
- Run everything directly on a physical device or virtual device, using eas or locally
This is just the beginning. From here, you could extend your dApp with NFTs, token swaps, DeFi integrations, or even a full-fledged Web3 game. The building blocks are all in your hands.
If this tutorial helped you, drop a ❤️, share it with your fellow builders, and let me know what feature you’d like me to cover next. Let’s keep pushing the limits of what’s possible with Web3 + mobile.
Top comments (0)