Open
Conversation
|
삭제 다이얼로그로 실수로 삭제되는걸 방지 했네요 좋은거같아요 |
|
삭제 다이얼로그에서 데이터 상태를 명확하게 구분하여 좋은 코드인 것 같습니다. |
|
삭제 다이얼로그 있는 건 엄청 좋은 것 같아요! 하지만 등록 버튼의 글자는 가로로 해야 가독성이 더 좋을 것 같습니다. |
seung-in-Yoo
left a comment
There was a problem hiding this comment.
수고하셨습니다! 코드를 직접 고민하고 바꿔보려고 한게 좋은것 같아요
| <meta charset="UTF-8" /> | ||
| <link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <title>Vite + React</title> |
| }); | ||
|
|
||
| const lastId = useRef( | ||
| todos.length > 0 ? Math.max(...todos.map((t) => t.id)) + 1 : 1 |
There was a problem hiding this comment.
이 부분 todos가 undefined나 비어있을 경우 처리가 문제가 있을수도 있다는 생각이 들어서 개선방안을 생각해보셔도 좋을 것 같네요! 예를들면 const lastId = useRef( todos.length ? Math.max(...todos.map((t) => t.id)) + 1 : 1 ); 이런식의 로직도 좋을것 같아요
|
삭제 다이얼로그를 따로 만드신게 인상적이었습니다 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 투두리스트 앱 (Todo List App)
리액트(React)와 테일윈드 CSS(Tailwind CSS)를 사용해 만든 간단한 할 일 관리 애플리케이션입니다. 모든 데이터는 브라우저의 로컬 스토리지에 저장되어 영속성을 가집니다.
✨ 주요 기능
🛠️ 사용 기술
React.js: (Vite 기반)JavaScript (ES6+)Tailwind CSS: (CDN 방식)📂 프로젝트 구조
🖼️ 스크린샷