Open yeongsbook opened 1 year ago
Ducks 패턴으로 잘 구현하셨습니다.
https://github.com/songhsb/redux_todolist/blob/2fb92b4f4b41a297e9fd41300e36101c0d16ee7b/src/redux/modules/todos.js#L19-L32 Home.jsx에서 addTodo할 때 uuid를 사용하여 id를 추가하고 있습니다. initialState의 id도 uuid를 사용하는 것이 보다 일관성 있는 코드가 될 것 같습니다.
filter 메서드는 새로운 배열을 반환하기 때문에 return [...deletTodo]
가 아닌 return deletTodo
로 수정 가능합니다.
map 메서드도 새로운 배열을 반환하기 때문에 return [...isDoneTodo]
가 아닌 return isDoneTodo
로 수정 가능합니다.
튜터님. 피드백 감사합니다. 피드백 확인하면서 공부해보겠습다.
2023년 6월 28일 (수) 오전 12:55, 오창영 @.***>님이 작성:
todo.js
Ducks 패턴으로 잘 구현하셨습니다.
https://github.com/songhsb/redux_todolist/blob/2fb92b4f4b41a297e9fd41300e36101c0d16ee7b/src/redux/modules/todos.js#L19-L32 Home.jsx에서 addTodo할 때 uuid를 사용하여 id를 추가하고 있습니다. initialState의 id도 uuid를 사용하는 것이 보다 일관성 있는 코드가 될 것 같습니다.
filter 메서드는 새로운 배열을 반환하기 때문에 return [...deletTodo]가 아닌 return deletTodo로 수정 가능합니다.
map 메서드도 새로운 배열을 반환하기 때문에 return [...isDoneTodo]가 아닌 return isDoneTodo로 수정 가능합니다.
— Reply to this email directly, view it on GitHub https://github.com/songhsb/redux_todolist/issues/1#issuecomment-1609801181, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5YD4AQYQNBX3LY3WLMEXUTXNL67HANCNFSM6AAAAAAZVN6DGI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
/detail
페이지로 이동하면 빈페이지가 나오고, 개발자 도구 콘솔창에 에러 메세지가 많이 나옵니다.
해당 줄은 지워주세요.
== 보단 ===로 비교해주세요.