Class

비구조화 할당 문법을 통해 props 내부 값 추출하기 - Typescript앞선 문법에서는 props를 그대로 사용했습니다.이번에는 함수 내부에서 변수에 할당 하여 사용 할 것 입니다.먼저 알아야 할 것!props 로 오는 값은 Object의 형태를 띄고 있습니다.Example// App.tsx에서 name, children 값을 보내 왔다고 가정하겠습니다.props = { name : 'Gong', children : 'React'}// name : string, children : string 인 것을 알 수 있습니다.// 따라서,interface PropFace{ name : string; children : string;}// props로 오는 name 그리고 childre..
코딩크리처
'Class' 태그의 글 목록