How hoanglehaithanh/react-native-expo-redux-template works
Project type and purpose
• This is a mobile application template built with React Native on top of the Expo framework, using Redux for state management.
• Its purpose is to provide a starting point (“boilerplate”) for building cross-platform (iOS/Android) apps, with ready-made structure for UI components, screen navigation, global state, theming, localization, and API services.
File structure
• Top‐level:
• App.tsx, index.tsx, app.json, package.json, tsconfig.json, babel.config.js, eas.json – core Expo + TypeScript config and entry points.
• src/ – all application code, further divided into:
– Components: reusable UI pieces.
– Screens: page‐level UI (Welcome, Home).
– Navigation: React Navigation setup (stack/tab/drawer).
– Store: Redux store config and reducers.
– Hooks: custom & Redux hooks.
– Services: API wrappers (e.g. users).
– Localization: language keys & files.
– Config: environment or API endpoints.
• CI/CD: .github/workflows for OTA updates, publishing.
• Extras: assets folder, .expo-shared.
Key insights from README
• Confirms use of Redux, Expo CLI, file‐structure rationale.
• No backend service is shipped, but Services folder is intended for HTTP/Firebase integrations.
a. Main components to represent:
1. Expo Runtime / Native Shell
2. App Entry & Providers
– Redux <Provider>
– Localization <Provider>
– Theme (styled-components or context)
3. Navigation Layer
– StackNavigator / TabNavigator
4. Screens (WelcomeScreen, HomeScreen, etc.)
5. Presentational Components (Buttons, Lists…)
6. Hooks Layer
– useSelector/useDispatch wrappers
7. Services Layer
– API clients (e.g. UsersService)
8. Redux Store
– Reducers (home, theme, etc.)
– Actions / Effects (thunks or sagas)
9. Config & Localization
– API endpoints / env
– Language resources
10. Theme Variables
b. Relationships & interactions:
• App.tsx boots up → wraps Navigation inside Redux and Localization providers.
• Navigation determines which Screen component to mount.
• Screens dispatch actions via Hooks → trigger Services for network calls → Services return data → dispatch results → update Redux store.
• Store updates propagate to UI via useSelector Hooks → Components re-render.
• Config provides endpoints to Services; Localization feeds strings into Screens/Components; Theme injects design tokens.
c. Architectural patterns / design principles:
• Container (Screen) vs. Presentational (Component) separation
• Unidirectional data flow (Redux)
• Separation of concerns: UI, state, services, config, localization, theme
• Single source of truth (Redux store)
• Context providers (theme / i18n)
d. Key technologies / libraries:
• React Native + Expo
• Redux (+ Redux Toolkit or plain)
• React Navigation
• TypeScript
• Expo OTA / EAS
• Custom Hooks for Redux bindings
• Localization via context
• Styled-components or plain StyleSheet with Theme variables
Detail checklist for the engineer
• Important protocols (HTTP/REST) or middleware if used.
• Call out the entry point (App.tsx) and major providers at the top.