Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ReactLearningApp

Implemented React Learning

πŸ“ React + TypeScript To-Do List (with LocalStorage)

A simple and interactive to-do list app built using:

  • React (UI framework)
  • TypeScript (type safety)
  • LocalStorage (data persistence)
  • Custom Hooks (logic separation)

Features:

  • Add tasks (duplicates prevented)
  • Mark tasks complete/incomplete
  • Delete tasks
  • Save tasks after refresh
  • Modern UI with hover effects

πŸ“‚ Folder Structure

src/

  • β”œβ”€β”€ main.tsx # App entry point
  • β”œβ”€β”€ App.tsx # Root component
  • β”œβ”€β”€ components/ # UI components
  • β”‚ β”œβ”€β”€ AddTodo.tsx # Add task form
  • β”‚ β”œβ”€β”€ TodoItem.tsx# Single task display
  • β”‚ └── TodoList.tsx# Task list display
  • β”œβ”€β”€ hooks/ # Custom hooks
  • β”‚ └── useTodos.ts # State + LocalStorage logic
  • β”œβ”€β”€ types/ # Type definitions
  • β”‚ └── todo.ts # Todo interface
  • └── styles/
  • └── globals.css # App styling

βš™οΈ How It Works

  1. State & Persistence

    • useTodos hook manages todos.
    • Reads from localStorage on load.
    • Saves to localStorage when todos change.
  2. Adding Tasks

    • AddTodo calls addTodo in useTodos.
    • Prevents duplicates (case-insensitive).
  3. Toggling & Deleting

    • TodoItem lets you check/uncheck or delete a task.

πŸš€ Run Locally

npm create vite@latest react-app --template react-ts
cd react-app
# Replace src/ with project files
npm install
npm run dev


🎯 Possible Upgrades

Filters: All / Active / Completed

Edit task names

Dark mode toggle

Animations with Framer Motion

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages