podoDJ / todolist-redux

스파르타코딩클럽 리액트 개인과제(todo list 리덕스)
0 stars 0 forks source link

Feedback #1

Open wildCodingWarrior opened 1 year ago

wildCodingWarrior commented 1 year ago

Overview Feedback

wildCodingWarrior commented 1 year ago

폴더 구조

image modules는 config가 아니라 redux 폴더 바로 아래 있어야합니다.

wildCodingWarrior commented 1 year ago

redux

https://github.com/podoDJ/todolist-redux/blob/d1ac59488980949e9f91a221af95450dc284a654/src/redux/config/modules/todo.js#L17-L29

action의 구조는 payload를 유지하는 것이 좋습니다. 차라리 이런식은 어땠을까요? 혼자 개발할 때는 상관없지만, ducks 패턴을 따르는 편이 더 좋겠네요.

export const changeIsDone = (id) => {
  return {
    type: CHANGE_IS_DONE,
    payload: id,
  };
};

https://github.com/podoDJ/todolist-redux/blob/d1ac59488980949e9f91a221af95450dc284a654/src/component/todoContainer.jsx#L23-L25

reducer 이름을 todoReducer로 하는 것이 더 직관적일 것이고, state 값이 todo가 아니라 todos나 todoList면 더 직관적이겠네요.

wildCodingWarrior commented 1 year ago

TodoContainer

image component 파일 이름은 대문자로 시작하는 것이 좋겠습니다.

https://github.com/podoDJ/todolist-redux/blob/d1ac59488980949e9f91a221af95450dc284a654/src/component/todoContainer.jsx#L23-L25 Style Component를 사용하는 만큼 굳이 style은 안써도 괜찮지 않았을까요? styled(Link)로 사용하면 어땠을 까 싶네요.

https://github.com/podoDJ/todolist-redux/blob/d1ac59488980949e9f91a221af95450dc284a654/src/component/todoContainer.jsx#L43-L75 선발대 자료 중에서 Styled Component 사용시 네이밍 컨벤션에 관한 내용이 있습니다. 지금도 괜찮지만, 다른 방법도 있다는 것을 알려드리고 싶네요.