03

모모의 블로그·2021년 8월 28일
0

TIL(Today I Learned)

목록 보기
3/4
  • React 사용시, function을 쓰는 경우와 class를 쓰는 경우의 차이?
    Component 작성시에 component내에 state가 필요하고 이에 따라 받아오는 데이터가 다르다면 extends Component...를 사용하는데, state가 필요없고 정적으로 데이터를 받아온다면 function을 써도 무방하다.
profile
Software Engineer, Front-end Developer

0개의 댓글