Skip to content

Conversation

@jahoon05
Copy link

@jahoon05 jahoon05 commented May 20, 2025

7주차 주자훈 과제 제출

@jahoon05 jahoon05 changed the title 7주차 과제 7주차 주자훈 과제 제출 May 20, 2025
@yoonhyoyeon
Copy link

  • 학습용 예제에서 index를 key값으로 많이 사용하지만,
    리액트에서 map으로 리스트를 렌더링할 때 key값으로 index를 사용하는 건 권장되지 않아요.
    그 이유에 대해서 한번 찾아보시면 좋을 것 같아요.

  • 아래 코드 처럼 S라는 네임스페이스로 묶어서 styled-component들을 import하면 일반 컴포넌트와 styled-component를 명확하게 구분할 수 있고 네이밍 충돌을 방지할 수 있어요.

import * as S from './StyledComponents.js';

function MyComponent() {
  return <S.Container>내용</S.Container>;
}

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