Cross-platform mobile development with Ionic Framework and React
This development container provides a complete Ionic React development environment with:
- ✅ Node.js 20 LTS
- ✅ Ionic CLI latest version
- ✅ React with TypeScript support
- ✅ Cordova for native builds
- ✅ Vite bundler
- ✅ Live reload development server
-
Open in VS Code
code . -
Reopen in Container
- Press
F1→Dev Containers: Reopen in Container
- Press
-
Create your first Ionic React app
ionic start myApp tabs --type=react cd myApp ionic serve --external -
Access your app
- Open browser at
http://localhost:8100
- Open browser at
- 📦 Node.js 20 - Latest LTS version
- ⚡ Ionic CLI - Ionic command-line interface
- ⚛️ React - UI library
- 📱 Cordova - Native app builds
- 🏃 Native Run - Run on devices
- ⚡ Vite - Fast bundler
- 🔧 npm - Default package manager
- 🧶 yarn - Alternative package manager
- ⚡ pnpm - Efficient package manager
- ✨ ESLint - Linter
- 💅 Prettier - Code formatter
- 📘 TypeScript - Type safety
ionic.ionic- Ionic extensiondsznajder.es7-react-js-snippets- React snippetsdbaeumer.vscode-eslint- ESLint integrationesbenp.prettier-vscode- Prettier formatterformulahendry.auto-rename-tag- Auto rename tagsms-vscode.vscode-typescript-next- TypeScript support
- base - Node.js 20
- build-tools - npm, yarn, pnpm
- ionic-cli - Ionic CLI, Cordova
- dev-tools - Linting, formatting, Vite
- android-tools - Android SDK (optional)
- tools - Additional utilities
- development - Dev environment
- builder - Build stage
- production - Nginx runtime
Uncomment the Android SDK stage in .devcontainer/Dockerfile.
# Tabs template
ionic start myApp tabs --type=react
# Sidemenu template
ionic start myApp sidemenu --type=react
# Blank template
ionic start myApp blank --type=react
# With Capacitor
ionic start myApp tabs --type=react --capacitor# Start dev server
ionic serve --external
# Start on specific port
ionic serve --port 8200 --external
# Lab mode (iOS & Android preview)
ionic serve --lab
# Build
ionic build
# Build for production
npm run build# Page
ionic generate page my-page
# Component
ionic generate component my-component
# Service
ionic generate service my-service# Add Capacitor
ionic integrations enable capacitor
# Add platforms
ionic cap add android
ionic cap add ios
# Sync web assets
ionic cap sync
# Open in native IDE
ionic cap open android
ionic cap open ios
# Run on device
ionic cap run android
ionic cap run ios
# Build native app
ionic cap build android
ionic cap build ios# Add platforms
ionic cordova platform add android
ionic cordova platform add ios
# Build
ionic cordova build android
ionic cordova build ios
# Run on device
ionic cordova run android --device
ionic cordova run ios --device
# Add plugins
ionic cordova plugin add cordova-plugin-camera# Camera
npm install @capacitor/camera
ionic cap sync
# Geolocation
npm install @capacitor/geolocation
# Storage
npm install @capacitor/storage
# HTTP
npm install @capacitor/http
# File System
npm install @capacitor/filesystem
# Network
npm install @capacitor/network
# Push Notifications
npm install @capacitor/push-notifications
# Social Sharing
npm install @capacitor/share
# Haptics
npm install @capacitor/haptics
# Status Bar
npm install @capacitor/status-bar
# Splash Screen
npm install @capacitor/splash-screenIonic provides rich UI components:
import {
IonButton,
IonCard,
IonCardHeader,
IonCardTitle,
IonCardContent
} from '@ionic/react';
function MyComponent() {
return (
<>
<IonButton>Click Me</IonButton>
<IonCard>
<IonCardHeader>
<IonCardTitle>Card Title</IonCardTitle>
</IonCardHeader>
<IonCardContent>
Card content
</IonCardContent>
</IonCard>
</>
);
}# State Management
npm install zustand
npm install @reduxjs/toolkit react-redux
npm install jotai
# Routing (built-in)
npm install react-router-dom
# Forms
npm install react-hook-form
npm install formik yup
# HTTP Client
npm install axios
npm install @tanstack/react-query
# UI Enhancements
npm install framer-motion
npm install react-spring# Run tests
npm test
# Run with coverage
npm test -- --coverage
# E2E tests with Playwright
npm install -D @playwright/test
npx playwright testPress F5 to launch Chrome debugger with your Ionic React app.
- 8100 - Ionic dev server default
- 3000 - React dev server alternative
- Ionic Documentation
- Ionic React
- Ionic Components
- Capacitor Documentation
- React Documentation
- Vite Documentation
Happy Coding! 🎉