Hands-on Practice I
Last updated
Last updated
Our Goal : User Profile App
Open a terminal and create a new React app:
Install the Bootstrap package:
Import Bootstrap into the index.js
file:
App.jsx
ComponentOpen src/App.jsx
and set it up to include the child UserProfile
component.
Here is the updated App.jsx
:
UserProfile.jsx
ComponentCreate a components
folder in the src
directory and add a file named UserProfile.jsx
.
Implement the UserProfile
component:
Create a src/App.css
file to add custom styles :
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.
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!