2단계: Props가 있는 카드
Coddy React 여정의 기초 (Fundamentals) 섹션에 포함된 레슨. 42개 중 40번째.
챌린지
쉬움카드를 재사용할 수 있게 만드세요.
name및bioprops를 받는ProfileCard를 정의하고, props 값으로 1단계와 같은 구조(카드 div,id="profile-name",id="profile-bio")를 렌더링하세요.- App에서 name이
Grace Hopper이고 bio가Invented the compiler인 ProfileCard 하나를 렌더링하세요.
직접 해보기
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<div id="root"></div>
<script type="module" src="main.jsx"></script>
</body>
</html>