This project is a React Micro Frontend (MFE) component that encapsulates a fully functional todo list application. It demonstrates the ability to design and structure a maintainable React application with TypeScript, focusing on code organization, testing, and integration with other host applications.
- Todo Creation: Users can input a new todo task description and add tasks to a list.
- Todo Status: Tasks have a checkbox to mark them as completed or incomplete, with visual distinction.
- Todo Persistence: Todo items are saved using the browser’s localStorage to persist across page refreshes and sessions.
- Filters: Buttons to filter the list by "All", "Active", and "Completed".
- React & TypeScript: Ensures type safety and maintainability.
- React Hooks: Custom hooks (
useTodos
,useTodoForm
) for state management and form handling. - LocalStorage: Utilized for persisting todo items.
- Testing: Comprehensive unit tests using Jest and React Testing Library to cover core component logic and edge cases.
-
Clone the Repository:
git clone <repository-url> cd todo-challenge
-
Install Dependencies:
pnpm install
-
Run the Development Server:
pnpm run dev
-
Build the Project:
pnpm run build
-
Run Tests:
pnpm run test
- Componentization: The application is divided into reusable components with clear responsibilities.
- Custom Hooks:
useTodos
manages todo states anduseTodoForm
handles form validation and submission. - LocalStorage Integration: Ensures todos persist across sessions.
- Testing: Focused on testing both the core logic and user interactions to ensure robustness.