Hands-on Practice I
UserProfile Card Challenge and Solution
Our Goal : User Profile App

A step-by-step guide to implementing a React User Profile App
Step 1. Setup the React App
Open a terminal and create a new React app:
Install the Bootstrap package:
Import Bootstrap into the
index.jsfile:
Step 2. Create the Parent App.jsx Component
App.jsx ComponentOpen
src/App.jsxand set it up to include the childUserProfilecomponent.Here is the updated
App.jsx:
Step 3. Create the Child UserProfile.jsx Component
UserProfile.jsx ComponentCreate a
componentsfolder in thesrcdirectory and add a file namedUserProfile.jsx.Implement the
UserProfilecomponent:
Step 4. Add Custom Styles (Optional)
Create a
src/App.cssfile to add custom styles :
Step 5. Test the Application
Run the app:
Open the browser and navigate to
http://localhost:5173. You should see the user profile displayed with the image on the left and name, email, and bio on the right.
6. Folder Structure Overview
After implementation, your folder structure should look like this:
This app now uses Bootstrap CSS for styling and follows the structure you described. You can customize further as needed!
Last updated