This is a React application built with Vite to demonstrate debugging common React issues and improving component design and state management.
- Displays a user’s profile via the
PersonCardcomponent. - Displays user activities via the
UserStatscomponent. - Uses React state and hooks to handle dynamic data.
- Styles applied via
app.cssandindex.cssfor a clean, user-friendly interface.
The original code had some bugs:
- Incorrect or inconsistent prop names.
- State initialized as
nullinstead of an empty array. - Components receiving wrong or missing props.
- The state setter function (
setActivities) declared but unused.
Note: The buggy code has been commented out for reference and debugging clarity.
- Global styles (body, background) are in
index.css. - Component-level styles (layout, sections, text) are in
app.css. - Clean white containers with subtle shadows and rounded corners.
- Consistent font styles and spacing for readability.
- Clone the repository:
git clone <your-repo-url>
cd react-debugging-checkpoint