Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2주차] 장효신 미션 제출합니다. #2

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

hyosin-Jang
Copy link

배포 링크

https://react-todo-17th-4dvn.vercel.app/

느낀 점

리엑트의 소중함을 다시 한번 느끼는 주차였습니다! 지난 주차에 받았던 피드백을 반영하려고 노력했습니다. 렌더링 성능은 최적화하지 못했는데 이 부분은 일요일까지 고민해보고 수정하겠습니다.

Key Questions

  1. Virtual-DOM은 무엇이고, 이를 사용함으로서 얻는 이점은 무엇인가요?
  • Virtual-DOM이란 실제 DOM의 복사본으로 UI 변경 사항을 빠르게 감지하고 업데이트하는 기술입니다. VirtualDOM을 사용하면 UI 변경사항을 적용하는데 필요한 시간과 계산 비용을 줄일 수 있어 렌더링 성능이 향상된다는 이점이 있습니다.
  1. 미션을 진행하면서 느낀, React를 사용함으로서 얻을수 있는 장점은 무엇이었나요?
  • 실제 DOM을 직접 조작할 필요가 없다는 것입니다. 가상 DOM은 리엑트와 같은 라이브러리에서 내부적으로 처리되므로 실제 DOM을 직접 조작할 필요가 없어집니다.
  • 지난 주차에 vanillaJS로 투두앱을 만들었을 때는 DOM에 접근하고, DOM을 조작하는 과정을 통해 UI 업데이트를 수동으로 처리했어야 했는데 리엑트에서는 virtualDOM을 사용해서 UI 변경 사항을 추적하고 필요한 부분만 업데이트할 수 있다는 점이 큰 장점이라고 생각합니다.
  1. React에서 상태란 무엇이고 어떻게 관리할 수 있을까요?
  • React에서 상태란 내부 컴포넌트에서 사용되는 값으로 함수형 컴포넌트에서는 useState 훅을 이용해서 상태를 관리합니다. 상태를 업데이트할 때는 setState를 이용합니다.
  1. Styled-Components 사용 후기 (CSS와 비교)
  • styled-components에서는 scss 문법을 지원하기 때문에 scss 문법을 사용해서 편하게 스타일링을 할 수 있었습니다.
  • 또한, 스스로 className을 생성하기 때문에 className 중복을 신경쓰지 않아도 된다는 점이 좋았습니다.

Copy link
Member

@chaeyeonan chaeyeonan left a comment

Choose a reason for hiding this comment

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

안녕하세요 효신님! 프론트운영진 안채연입니다

우선 이번주 과제 너무 수고많으셨습니다! ㅎㅎ 코드도 너무 깔끔하게 작성해주셔서 딱히 크게 피드백드릴만한게 없네요.! ✨
앞으로 과제가 넘 기대됩니다! ㅎㅎ

이번주 과제 수고하셨고 발표 화이팅입니다!

display: flex;
align-items: center;
padding: 3px 0 3px 10px;
cursor: pointer;
Copy link
Member

Choose a reason for hiding this comment

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

이런 디테일 좋네요!


const handleSubmit = (e) => {
e.preventDefault()
const inputValueTrim = input.value.trim()
Copy link
Member

Choose a reason for hiding this comment

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

공백 처리 좋습니다!

<section className="container-input">
<h1 className="title">Things to do</h1>
<form
className="input-wrapper"
Copy link
Member

@chaeyeonan chaeyeonan Mar 25, 2023

Choose a reason for hiding this comment

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

종종 className을 사용하는게 보이는데, 혹시 styled-component를 사용하고 있음에도 불구하고 className를 사용하시는 이유가 있을까요?

styled-component를 사용할때 className를 함께 사용하는건 권장되지 않는다고 합니다! 이미 styled-component를 사용하고 있는 만큼 className 대신에 컴포넌트로 관리해주면 좋을 것 같아요!

Copy link
Author

Choose a reason for hiding this comment

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

styled-component로 만들기에는 자잘한 코드들은 className으로 관리했는데 말씀대로 하나로 통일하는게 좋을거 같네요! 피드백 감사합니다 ㅎㅎ

Comment on lines +3 to +19
const TodoItem = ({item, toggleStatus, removeItem}) => {
const getPriorityToTagSize = (priority) => {
switch (priority) {
case "5":
return <h1>{item.value}</h1>
case "4":
return <h2>{item.value}</h2>
case "3":
return <h3>{item.value}</h3>
case "2":
return <h4>{item.value}</h4>
case "1":
return <h5>{item.value}</h5>
default:
return <span>{item.value}</span>
}
}

Choose a reason for hiding this comment

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

우왕 중요도 선택에 따라서 폰트 사이즈를 다르게 해주는 아이디어!!! 굿👏🏻👏🏻

Comment on lines +5 to +17
const Animation = () => {
return (
<Wrapper>
<Lottie
loop
animationData={Popper}
play
/>
</Wrapper>
)
}

export default Animation

Choose a reason for hiding this comment

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

이런 애니메이션 기능까지 추가하셨네용!! 넘 귀여워요~!!!

Copy link

@sujinRo sujinRo left a comment

Choose a reason for hiding this comment

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

안녕하세요, 효신님. 노수진입니다!

효신님 코드가 깔끔하고, 애니메이션 기능, 메모제이션 등 리액트에서 사용 가능한 기능들을 잘 사용하신 것 같아 많이 배워갑니다!!
이번에 하실 발표 너무 기대되네욤,,,ㅎㅎㅎ 수고하셨습니다!!👍

<input
type="text"
onChange={onChange}
autoFocus
Copy link

Choose a reason for hiding this comment

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

autoFocus로 input에 자동 포커스 준거 좋은 것 같습니다!!

saveToDos()
},
[todo, done]
)
Copy link

Choose a reason for hiding this comment

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

if문을 이용해 삭제와 done<->todo간의 이동을 깔끔하게 코딩하신 것 같아 많이 배워갑니다,,!

</button>
)
}

export default Button
export default React.memo(Button)
Copy link

Choose a reason for hiding this comment

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

메모제이션을 잘 이용하시는 것 같아요,,! 👍

Copy link
Member

@JeeeunOh JeeeunOh left a comment

Choose a reason for hiding this comment

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

안녕하세요 프론트 운영진 오지은입니다~~~
html, css, js, react 모두 이해도가 높은게 잘 느껴지는 코드였습니다 ㅎㅎ
디테일이 정말 많아서 감탄하면서 봤네요!!
첨언을 많이 하고 싶었는데 정말 군더더기가 없었던 건 덤이구요..ㅎㅎ
정말 고생하셨습니다 다음 스터디때도 화이팅입니다💕💕💕

<>
{todo &&
todo
.sort((a, b) => b.priority - a.priority)
Copy link
Member

Choose a reason for hiding this comment

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

중요도 순으로 소팅해주신 디테일 좋네요 ㅎㅎㅎㅎ


return (
<Wrapper>
<section className="container-input">
Copy link
Member

Choose a reason for hiding this comment

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

시멘틱 태그까지 적용해주셨군요..! 굿입니다 ㅎㅎㅎㅎ

@@ -0,0 +1,89 @@
.input {
Copy link
Member

Choose a reason for hiding this comment

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

전반적으로 css 속성에 대한 이해도가 높으신 것 같아 재밌게 봤습니다 ㅎㅎ
배워가는게 왕창인 코드네용

@hmuri
Copy link

hmuri commented Mar 26, 2023

안녕하세요, 최민주입니다! 이렇게 효신님 코드를 볼 수 있게 되어 정말 감사한 것 같아요!! 리액트 완전 초보자인 저에게 정말 눈이 번쩍 뜨일 만한 코드였네요 ㅎㅎ 저도 잘 알아볼 수 있을 정도로 잘 정리도 되어있는데, 거기에 다양한 내장 기능들을 깔끔하게 사용하신 게 굉장히 인상 깊었습니다!! 특히 저도 sorting 넣어보고 싶었는데 결국 구현 못하고 실패했거든요.. 근데 효신님 코드에서 sorting을 어떻게 구현할 수 있는지 볼 수 있어서 정말로 공부할 게 많았습니다~ 감사해요!! 앞으로도 좋은 코드들 견식할 수 있길 응원하겠습니다>ㅡ<

default:
return <span>{item.value}</span>
}
}
Copy link

Choose a reason for hiding this comment

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

우와! 중요도 선택에 따라 글씨 크기가 달라지는 걸 이렇게 head 태그들로 구현하셨군요!! 굳이 폰트 또 쓰고 하면 지저분해질 텐데 저렇게 태그 따라 글씨 크기 달라질 수 있게 해주신 게 신박하게 느껴져요 배워갑니다~

<TodoContainer
todo={todo}
Copy link

Choose a reason for hiding this comment

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

개인적으로 이 todo.js 에서 정말 많이 배웠습니다! 한 페이지에서 todo와 done 리스트를 사용해서 반복되는 코드는 최대한 줄이면서도 두 리스트간의 유사성을 찾아 체계적으로 코드를 정리하신 게 한 눈에 들어왔어요! 로컬까지 적용 시키면서도 다양한 sueState들을 통해 priority 관리와 toggle까지 적절히 적용시키신 게 인상깊었습니다. 삼항연산자부터 useEffect, find까지 리액트가 이렇게 쓰일수 있구나 많이 배워갑니다 bb

justify-content: center;
align-items: center;
font-family: NotoSansKRRegular;
user-select: none;
Copy link

Choose a reason for hiding this comment

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

ㄱ,,,강아지 쓰면 반칙... 진짜 쓰고싶어지잖아요 ㅠ 디자인까지 귀엽고 폰트까지 깔끔해서 즐겁게 이것저것 적어봤습니다 ㅎㅎ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants