A simple React project demonstrating the usage of components and props in a clean, modern movie listing interface.
This project serves as an educational example showcasing:
- Component composition - Building reusable UI components
- Props usage - Passing data between components
- TypeScript interfaces - Type-safe component props
- Modern CSS - Clean, responsive styling
src/
├── App.tsx # Main app component with movie data
├── MovieItem.tsx # Reusable movie card component
├── App.css # Legacy styles (empty)
└── index.css # Main styling
- Purpose: Main container that holds movie data and renders the grid
- Features:
- Manages movie data array
- Renders title and movie grid
- Maps over movies and passes props to MovieItem components
- Purpose: Reusable component for displaying individual movies
- Props:
title: string- Movie titleyear: number- Release yearimage: string- Movie poster image URL
- Features:
- Clean card layout
- Hover effects
- Responsive design
- Component Reusability: The
MovieItemcomponent is used multiple times with different data - Props Interface: TypeScript interface defines the expected props structure
- Data Flow: Parent component (App) passes data down to child components (MovieItem)
- Separation of Concerns: Styling, data, and presentation logic are properly separated
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open your browser and visit the local development URL
The project uses modern CSS with:
- CSS Grid for responsive layout
- Clean typography and spacing
- Subtle hover animations
- Mobile-friendly design
- React - UI library
- TypeScript - Type safety
- Vite - Build tool
- CSS - Styling
This is a learning project focused on demonstrating React component and props fundamentals.
