Welcome to Design To Deployment! This guide will help you set up your environment and start developing React Native apps with Expo, even if you don’t have Node.js installed yet.
Ensure you have the following:
- A computer running macOS, Linux, or Windows
- A stable internet connection
Node.js is required to run React Native and Expo.
- Download and install Homebrew (if not already installed):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install Node.js using Homebrew:
brew install node
- Verify installation:
node -v npm -v
- Update package list:
sudo apt update && sudo apt upgrade -y
- Install Node.js and npm:
sudo apt install -y nodejs npm
- Verify installation:
node -v npm -v
- Download and install Node.js.
- Restart your terminal and verify installation:
node -v npm -v
Expo is a framework for building React Native apps quickly.
npm install -g expo-cli
Verify installation:
expo --version
npx create-expo-app DesignToDeployment
cd DesignToDeployment
npm start
This will open the Expo Developer Tools in your browser.
An Expo Go account allows you to log in, sync projects, and access additional features.
- Visit Expo’s signup page and create an account.
- Alternatively, create an account via the terminal:
expo register
- Once registered, log in to your account:
expo login
- On a physical device: Install the Expo Go app from the App Store or Google Play, then scan the QR code from the terminal.
- On an emulator:
- For iOS: Open with Xcode’s simulator (
i
in the terminal) - For Android: Start an Android emulator (
a
in the terminal)
- For iOS: Open with Xcode’s simulator (
If you want to use Lucide Icons in your React Native project, you can install them with the following command:
npm install lucide-react-native
Then, you can use the icons in your components like this:
import { View, Text } from 'react-native';
import { Activity, Star } from 'lucide-react-native';
const App = () => {
return (
<View>
<Text>Hello World</Text>
<Activity size={32} color="black" />
<Star size={32} color="gold" />
</View>
);
};
export default App;
Open the project in a code editor like VS Code and modify App.js
to start building your React Native app.
- If you encounter permission errors on macOS/Linux, try running:
sudo npm install -g expo-cli
- On Windows, ensure you run the terminal as Administrator.
Happy coding! 🚀