Skip to content

Palsa131/hex colors gradient#5

Open
palsa131 wants to merge 6 commits intomainfrom
palsa131/HexColorsGradient
Open

Palsa131/hex colors gradient#5
palsa131 wants to merge 6 commits intomainfrom
palsa131/HexColorsGradient

Conversation

@palsa131
Copy link
Copy Markdown
Contributor

@palsa131 palsa131 commented Feb 2, 2022

리뷰 시 참고 사항

  1. 앞서 작업했던 color를 가져와 변경하는 식으로 사용 했습니다.

실행 화면

hexcolors

@palsa131 palsa131 self-assigned this Feb 2, 2022
Copy link
Copy Markdown
Contributor

@jinn2u jinn2u left a comment

Choose a reason for hiding this comment

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

제 개인적인 생각으로 App에 너무 많은 책임이 있는것은 아닌가 라는 생각이 듭니다..!
저 같은 경우 App에는 여러 컴포넌트들에게 사용될 전역 상태를 저장 해 두었고, 인스턴스를 생성하는 역할과, body의 상태가 변경되는 로직만을 넣어두었습니다.
그게 아니라 새로운 컴포넌트를 만들기 싫다면 App의 render안에 작성해두는것이 더 가독성이 좋은것 같습니다.
져니는 어떻게 생각하나요?

value: 'Change!!'
},
onClick: ()=>{
const linearGradient = Array(2).fill(0)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

랜덤 16진수를 만드는 함수가 따로 있더라구요..!

const randomHexColor = () => `#${Math.round(Math.random() * 0xffffff).toString(16)}`;

참고하면 좋을것 같습니다!

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.

2 participants