A modern and minimalist Todo app built with React, leveraging the Context API for global state and localStorage to persist tasks across sessions.
- Add, edit, and delete todos
- Mark todos as completed/incomplete
- Persist data using browser
localStorage - Context API-based global state (no Redux)
- React (Vite)
- Context API
- localStorage
- JavaScript
- Tailwind CSS
todo-app/
├── public/
│ └── vite.svg
├── src/
│ ├── components/
│ │ ├── TodoForm.jsx
│ │ └── TodoItem.jsx
│ ├── context/
│ │ └── TodoContext.js
│ ├── App.jsx
│ ├── index.css
│ └── main.jsx
├── .gitignore
├── package-lock.json
├── eslint.config.json
├── LICENSE
├── package.json
├── vite.config.json
├── index.html
└── README.md
- Node.js (v18+)
- npm or yarn
git clone https://github.com/anand11206/TodoReactAndContextAPI.git
cd TodoReactAndContextAPI
npm install
# or
yarn installnpm run dev # For ViteThen visit:
http://localhost:5173 or what terminal shows
npm run buildThe output will be in the dist/ (Vite) or build/ (CRA) directory.
- The Context API provides a global state that holds the todo list and related actions.
- The todo list is synced to
localStorageusinguseEffect, so tasks persist after a page refresh or browser restart.
This project is licensed under the MIT License.
See the LICENSE file for details.
Your Name
GitHub: @anand11206
All contributions are welcome.
Feel free to fork, raise issues, or submit pull requests.