How pham-hoai-lam/test-react-redux works
Main Components
• Frontend Entry Point: Highlight the index.html within the public folder and the entry point (src/index.js) where the app starts bootstrapping.
• React Components: Include the presentational components (e.g., Header, Footer, MainSection, TodoItem, TodoTextInput) housed under the src/components directory.
• Containers: Identify the state-aware container components (e.g., TodoApp, DevTools) in src/containers that connect with the state/store and encapsulate business logic.
• State Management: Mark the actions (src/actions/TodoActions.js), constants (src/constants/ActionTypes.js and TodoFilters.js), and reducers (src/reducers/todosReducers.js and rootReducer.js) which together handle the application state changes.
Architectural Patterns
• Separation of Concerns: Differentiate between presentational components (UI rendering only), container components (state management), and state/action management (logic for state updates).
Examining Project Details
• Check the README which confirms that the project was bootstrapped with Create React App, so keep in mind that the default project structure and build configuration are maintained.
– From User Interaction → TodoTextInput → dispatches TodoActions.
– From TodoActions → reducers (todosReducers, aggregated via rootReducer) → state updates.
– From state updates → container component (TodoApp) → UI components.
– UI Components (presentational) vs. State/Business Logic Components
– Bootstrapping files and static assets.