Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Build Reusable User Cards | Reusable Components and Data Flow
Introduction to React

Challenge: Build Reusable User Cards

Swipe to show menu

Task

Create a reusable UserCard component that displays user information using props. The UserCard component must include:

  1. A heading (h2 element). Its text content must display the name prop.

  2. A paragraph (p element). Its text content must display the job prop.

The App component already renders multiple UserCard components with different props.

Starter Code

Open the starter project below and complete the missing parts of the component.

Starter code

Solution

You can compare your result with the final solution below.

Solution code

Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 2. Chapter 2

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

Section 2. Chapter 2
some-alt