This is a functional To-Do application developed using React. The project demonstrates core React concepts such as component-based architecture, state management, and Context API. It also integrates localStorage for data persistence and provides a smooth user experience with interactive features.
- React: For building the user interface and managing state.
- React Context API: For state management across the application.
- TypeScript: Ensuring type safety and better development experience.
- localStorage: To persist todos data across browser sessions.
- SCSS: For styling and responsive design.
- Add New ToDo: Users can add new tasks to their list.
- Status Management: Each todo has an ID, title, and a completion status (default: false).
- Persistent Storage: Todos are saved in localStorage, ensuring data persists between sessions.
- Todo Filtering: Filter tasks by status - All, Active, or Completed.
- Delete Todos: Easily remove tasks using the delete button.
- Clear Completed: Clear all completed tasks with a single click (button is disabled if no tasks are completed).
- Toggle Status: Mark individual tasks as completed or not.
- Toggle All: A single checkbox to mark all tasks as completed or uncompleted.
- Inline Editing: Double-click on a todo to edit it directly.
- Save changes by pressing Enter or clicking outside the input field.
- Delete the todo if the title is empty.
- Cancel editing with the Escape key.
- Dynamic Counter: Displays the count of active (not completed) todos.
- Add new tasks using the input field.
- Manage tasks by toggling their status, editing, or deleting them.
- Filter tasks based on their completion status.
- Clear all completed tasks with the "Clear Completed" button.
- The app automatically saves your tasks, so they remain available even after closing the browser.
To run this project locally, follow these steps:
- Node.js: Ensure you have Node.js installed. This project is tested with Node.js v16. You can download it from Node.js official website.
-
Clone the Repository:
git clone https://github.com/yourusername/To-do-app.git cd To-do-app -
Install Dependencies:
npm install
-
Run the Development Server:
npm start
-
Open http://localhost:3000 in your browser to see the app running locally.
To create a production build:
npm run build