작성
·
101
0
props 보낼때요
const Home = () => { | |
return ( | |
<> | |
<Head> | |
<title>NodeBird</title> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/antd/3.16.2/antd.css" /> | |
</Head> | |
<AppLayout> | |
<div>Hello, Next!</div> | |
</AppLayout> | |
</> | |
); | |
}; |
이런식으로 받으면 AppLayout 에서는
children 으로 props 값인 <div>Hello, Next!</div>
받잖아요.
그런데 props 명은 꼭children 이여야하나요?
다른 이름으로 하면 받을 수 없는거 같더라구요?
바꾸는 법도 따로 있나요?
답변 1
0