A simple yet dynamic To-Do List Application built using React. This app allows users to add, complete, delete, and filter tasks while persisting data using local storage.
- ✅ Add new tasks
- ✅ Mark tasks as complete/incomplete (Double click)
- ✅ Delete tasks
- ✅ Filter tasks by All, Completed, and Pending
- ✅ Persist tasks in local storage
- ✅ Fetch initial data using DummyJSON API
TodoApp.js
→ Main component that holds the app state.TodoList.js
→ Displays the list of tasks.TodoItem.js
→ Represents each task with actions.AddTodo.js
→ Handles adding new tasks.Filter.js
→ Provides filtering functionality.
- React (Hooks:
useState
,useEffect
) - CSS (For improved UI/UX)
- Local Storage (To retain tasks after refresh)
📂 todo-app
┣ 📂 src
┃ ┣ 📂 components
┃ ┃ ┣ 📜 AddTodo.js
┃ ┃ ┣ 📜 TodoApp.js (Modified entry point)
┃ ┃ ┣ 📜 TodoItem.js
┃ ┃ ┣ 📜 TodoList.js
┃ ┃ ┗ 📜 Filter.js
┃ ┣ 📜 index.js (Entry point)
┃ ┗ 📜 styles.css (Custom styles)
┣ 📜 package.json
┣ 📜 README.md
┗ 📜 .gitignore
-
Clone the repository:
git clone https://github.com/github8084/todo-app.git cd todo-app
-
Install dependencies:
npm install
-
Run the application: npm start # For Create React App npm run dev # For Vite
-
Open in browser: http://localhost:3000 # Default React port http://localhost:5173 # If using Vite
The app fetches initial to-do data from DummyJSON API: GET https://dummyjson.com/todos
🚀 Happy Coding! 🎉