Menu
CoddyTech

2단계: Props가 있는 카드

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

challenge icon

챌린지

쉬움

카드를 재사용할 수 있게 만드세요.

  1. name 및 bio props를 받는 ProfileCard를 정의하고, props 값으로 1단계와 같은 구조(카드 div, id="profile-name", id="profile-bio")를 렌더링하세요.
  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)의 모든 레슨