Get up and running with React Native Starter in under 5 minutes.
Before you begin, ensure you have:
- Node.js (v18 or later) - Download
- npm or yarn - Comes with Node.js
- Expo Go app (optional) - For testing on physical devices
- Xcode (latest version) - Download from App Store
- iOS Simulator - Included with Xcode
- Android Studio - Download
- Android SDK - Installed via Android Studio
- Android Emulator - Set up via Android Studio
- Clone or fork the repository:
git clone https://github.com/koniz-dev/react-native-starter.git
cd react-native-starter- Install dependencies:
npm install- Set up environment variables (optional):
cp .env.example .envEdit .env and add your API URL if needed:
EXPO_PUBLIC_API_URL=https://api.example.comnpm startThis starts the Expo development server. You'll see a QR code and options to:
- Press
a- Open on Android emulator/device - Press
i- Open on iOS simulator (macOS only) - Press
w- Open in web browser - Scan QR code - Open in Expo Go app on your device
# Android
npm run android
# iOS (macOS only)
npm run ios
# Web
npm run webreact-native-starter/
├── app/ # Expo Router screens (file-based routing)
│ ├── (tabs)/ # Tab navigation screens
│ └── _layout.tsx # Root layout with theme provider
├── components/ # Reusable UI components
│ ├── ErrorBoundary.tsx
│ └── LoadingScreen.tsx
├── hooks/ # Custom React hooks
│ └── useFetch.ts # Data fetching hook
├── services/ # API & storage services
│ ├── api.ts # Axios client with interceptors
│ └── storage.ts # AsyncStorage wrapper
├── types/ # TypeScript type definitions
│ └── api.ts # API response types
├── constants/ # App constants
│ ├── Colors.ts # Color definitions
│ └── Theme.ts # React Native Paper theme
├── assets/ # Images, fonts, static files
└── docs/ # Documentation
app/- All screens go here. Files automatically become routes (Expo Router).components/- Reusable UI components used across screens.hooks/- Custom React hooks for shared logic (e.g.,useFetch).services/- API client and storage utilities.constants/- App-wide constants like colors and theme config.types/- TypeScript interfaces and types.
Now that you're running, here's where to start coding:
- Explore existing screens - Check
app/(tabs)/index.tsxto see example usage - Add a new screen - See How to Add a New Screen
- Customize theme - Edit
constants/Theme.tsandconstants/Colors.ts - Connect to your API - Update
EXPO_PUBLIC_API_URLin.envand modifyservices/api.ts - Read the guides - Check out How-To Guides for common tasks
npm start- Start Expo dev servernpm run android- Run on Android emulator/devicenpm run ios- Run on iOS simulator/devicenpm run web- Run in web browsernpm run lint- Check code qualitynpm run lint:fix- Fix linting issues automaticallynpm run format- Format code with Prettiernpm test- Run tests
Port already in use:
# Kill process on port 8081 (default Expo port)
npx kill-port 8081
npm startMetro bundler cache issues:
npm start -- --clearNode modules issues:
rm -rf node_modules package-lock.json
npm installiOS build issues (macOS):
cd ios
pod install
cd ..
npm run iosThis starter comes with:
- ✅ React Native Paper - Material Design 3 components
- ✅ Dark/Light mode - Automatic system preference detection
- ✅ API client - Axios with interceptors for auth & errors
- ✅ Storage service - AsyncStorage wrapper with TypeScript
- ✅ Custom hooks -
useFetchfor data fetching - ✅ Error boundary - Global error handling
- ✅ Loading states - Built-in loading screen component
- ✅ Authentication example - Complete login flow with token management
- ✅ TypeScript - Full type safety
- ✅ ESLint + Prettier - Code quality tools
- ✅ Example screens - See it in action
- How-To Guides - Common development tasks
- Code Conventions - Project standards and best practices
- API and Storage - Backend integration guide
- UI Library Guide - React Native Paper components
- Expo Documentation - Official Expo docs
- Check the How-To Guides for common questions
- Review Code Conventions for project standards
- Visit Expo Discord for community support