2) Props와 State
1. Props - 속성
// 부모 컴포넌트
function Parent() {
return <Child name="홍길동" />;
}
// 자식 컴포넌트
function Child(props) {
return <h1>안녕하세요, {props.name}님!</h1>;
}2. State - 상태
1) useState
Last updated