/
/
| title | Source Directory |
| tags | directory-docsourcearchitecture |
The main application source directory for the todo app. Built with React 19, TypeScript, and Vite.
src/
├── App.tsx Root component — composes everything
├── main.tsx ReactDOM entry point
├── types.ts Shared Todo interface
├── components/
│ ├── TodoList.tsx Renders sorted list of todos
│ ├── TodoItem.tsx Single todo with toggle + delete
│ └── AddTodo.tsx Controlled form for new todos
└── hooks/
└── useTodos.ts State + localStorage persistence
All state lives in the useTodos hook. The App component destructures its return value and passes handlers down as props:
useTodos → App → AddTodo (addTodo)
→ TodoList → TodoItem (toggleTodo, deleteTodo)
directory documentation file. It lives at .obsidian/src.md and is associated with the src/ directory. In the sidebar, directories with documentation show a book icon.
| File | Role |
|---|---|
App.tsx | Orchestrates layout and passes state |
useTodos.ts | Single source of truth for todo state |
types.ts | Shared Todo interface used everywhere |