You will refactor an existing React application to demonstrate a strong understanding of:
- Feature-based architecture
- Custom hook design and reuse
You will not create a new application from scratch. The goal is to improve structure, separation of concerns, and logic organization.
git clone https://github.com/ITC-Frontend-Advanced/React-Task-Architecture-Custom-Hooks.gitgit checkout appBefore making any changes, carefully analyze the existing codebase.
Understand how components, logic, and data flow are currently structured.
The repository contains two branches:
-
main
Contains this task description and instructions. -
app
Contains an existing React application with:- Mixed responsibilities
- Centralized logic
- Poor or flat structure
Your job is to refactor the application, not rewrite it.
You must reorganize the project into a feature-based architecture.
src/
├─ features/
│ ├─ users/
│ │ ├─ components/
│ │ ├─ hooks/
│ │ ├─ services/
│ │ └─ index.ts
├─ shared/
│ ├─ components/
│ ├─ hooks/
│ └─ utils/
└─ app/
└─ App.tsx
- No feature logic inside
App.tsx - No API or business logic inside UI components
- Each feature must be isolated and self-contained
You must extract at least two custom hooks from the existing code.
- Handles data fetching
- Manages loading and error states
- Includes cleanup when necessary
Examples:
useCanvasuseFetchuseMobile
- Hooks must be generic and reusable
- Hooks must not depend on specific UI components
Your submission must include:
- ✅ Refactored code pushed to GitHub
- ✅ Clean, feature-based folder structure
- ✅ A
README.mdfile explaining:- What was refactored
- Why the new structure is better
- List of extracted custom hooks
- How to run the project
- UI improvements are not required
- Styling changes are not required
- Focus on structure and logic only
4 Jan 2026 — 11:59 PM