How aya-alsakkaf/rn-expo-router-navigation-prac works
Project type and purpose
• This is a React Native mobile application built with Expo and the Expo Router (file-based routing).
• Its primary function is to display a list of products (from a local data module) and allow navigation to product details.
File structure
• Top-level:
– app/ – contains entry point, layout, and route files
– components/ – reusable UI components (ProductList, ProductItem)
– data/ – product data source (products.ts)
– assets/ – static assets (fonts, images)
– config: app.json, tsconfig.json, eslint.config.js
• Routing pattern:
– app/index.tsx → home screen (probably product list)
– app/product/_layout.tsx → layout wrapper for product screens
– app/product/ProductDetails.tsx → detail screen
README for additional insights
• Confirms usage of file-based routing via Expo Router.
• No external backend; all data is local.
1. Expo Dev Server / Metro Bundler (development environment)
2. Mobile App (React Native + Expo runtime)
3. Expo Router (file-based navigation layer)
4. Screens:
– HomeScreen (app/index.tsx)
– ProductListScreen (could be same as Home)
– ProductDetailsScreen (app/product/ProductDetails.tsx)
5. UI Components (components/ProductList.tsx, ProductItem.tsx)
6. Local Data Store (data/products.ts)
7. Static Assets (assets/images, assets/fonts)
8. Native Device (iOS Simulator, Android Emulator, or Expo Go)
• Mobile App ↔ Expo Dev Server: bundler & live reload
• Mobile App → Expo Router: resolves URL → renders matching Screen
• Screens → UI Components: compose UI
• Screens → Local Data Store: read product data
• Screens → Static Assets: load images & fonts
• User (on device) → Screens: touch events trigger navigation
c. Architectural patterns and design principles:
• Component-based architecture (atomic UI components)
• File-based routing for navigation
• Single-source data (local module for products)
• Separation of concerns: routing, presentation (screens), data, assets
d. Technologies and frameworks:
• React Native + Expo runtime
• Expo Router for navigation
• TypeScript (tsconfig.json)
• Metro Bundler (built into Expo)
• ESLint for code quality