Menu
Coddy logo textTech

2단계: Props를 활용한 카드

Coddy React 여정의 기초 (Fundamentals) 섹션에 포함된 레슨 — 42개 중 40번째.

challenge icon

챌린지

쉬움

카드 구성 요소를 재사용 가능하게 만드세요.

  1. namebio props를 전달받고, 전달받은 prop 값으로 1단계와 동일한 구조(card div, id="profile-name", id="profile-bio")를 렌더링하는 ProfileCard를 정의하세요.
  2. 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>

기초 (Fundamentals)의 모든 레슨