Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
49 changes: 48 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,48 @@
# 리액트 투두 앱 만들기 미션 레포
# Todo List App

React를 활용해 만든 할일 관리 애플리케이션입니다.

** 실수로 설정을 잘못해 완성 후 새롭게 branch를 작성해 결과물을 올리는거라 commit이 누락되었습니다. **

---

## 기능 목록

- ✅ 할일 추가
- ✅ 할일 삭제
- ✅ 할일 완료 토글 (체크박스)
- ✅ 완료된 할일 중간선 표시
- ✅ 빈 값 입력 방지 (알럿)
- ✅ 중복 할일 등록 방지 (알럿)
- ✅ 전체 / 완료 / 남은 할일 개수 표시
- ✅ 모든 할일 완료 시 메시지 표시
- ✅ localStorage로 새로고침 후에도 데이터 유지

---

## 폴더 구조

```
src/
├── hooks/
│ └── useTodo.js # 상태 및 비즈니스 로직 (localStorage 포함)
├── component/
│ ├── TodoForm.jsx # 할일 입력 폼
│ ├── TodoList.jsx # 할일 목록
│ └── TodoStats.jsx # 통계 (전체/완료/남은 개수)
├── App.jsx # 컴포넌트 조립
├── main.jsx # 앱 진입점
└── index.css # 전역 스타일
```

---

## 컴포넌트 역할

| 파일 | 역할 |
| --------------- | ----------------------------- |
| `useTodo.js` | 상태, 로직, localStorage 관리 |
| `App.jsx` | hook 호출 + 컴포넌트 조립 |
| `TodoForm.jsx` | 할일 입력 UI |
| `TodoList.jsx` | 할일 목록 렌더링 UI |
| `TodoStats.jsx` | 통계 및 완료 메시지 UI |
29 changes: 29 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import { defineConfig, globalIgnores } from 'eslint/config'

export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{js,jsx}'],
extends: [
js.configs.recommended,
reactHooks.configs.flat.recommended,
reactRefresh.configs.vite,
],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
parserOptions: {
ecmaVersion: 'latest',
ecmaFeatures: { jsx: true },
sourceType: 'module',
},
},
rules: {
'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }],
},
},
])
13 changes: 13 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>react_todo_mession1</title>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

프로젝트 이름에 오타가 있는 것 같습니다. react_todo_mession1 대신 react_todo_mission1이 의도된 이름이라면 수정하는 것이 좋습니다.

Suggested change
<title>react_todo_mession1</title>
<title>react_todo_mission1</title>

</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
Loading