Skip to content

진민관 weatherapp과제#2

Open
chin00011122 wants to merge 2 commits intoTEAM-ALOM:mainfrom
chin00011122:main
Open

진민관 weatherapp과제#2
chin00011122 wants to merge 2 commits intoTEAM-ALOM:mainfrom
chin00011122:main

Conversation

@chin00011122
Copy link
Copy Markdown

날씨 예보

@yoonhyoyeon
Copy link
Copy Markdown

  • 학습용 예제에서 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