Component Library
ReactFlix is built with a modular component architecture that promotes reusability and maintainability. The component library includes display components for movies, navigation elements, and interactive modals.Component Architecture
The components follow React functional component patterns with hooks for state management:- Presentational Components: Pure components that receive data via props
- Container Components: Components with internal state using
useStateanduseEffect - Controlled Components: Form elements controlled by parent state
Component Categories
Movie Display
Components for displaying movie information, including cards and grids
Search & Filter
Interactive components for searching and filtering movie content
Modals
Modal dialogs for trailers and interactive content
Layout
Header, footer, and navigation components
Core Components
Movie Display Components
- PeliculaCard - Individual movie card with poster, metadata, and actions
- PeliculaGrid - Responsive grid layout for displaying multiple movies
Interactive Components
- SearchBar - Text input for searching movies by title, director, or actor
- CategoryFilter - Dropdown for filtering movies by genre
- TrailerModal - Full-screen modal for displaying movie trailers
Layout Components
- Header - Main navigation header with logo and menu links
- Footer - Site footer with links and contact information
- LoadingSpinner - Loading indicator for async operations
Styling Approach
All components use BEM (Block Element Modifier) naming convention for CSS classes:State Management Patterns
- Local State
- Prop Callbacks
- Effects
Components like
PeliculaCard use local state for UI interactions:Import Patterns
Components can be imported individually:Next Steps
Movie Card
Learn about the PeliculaCard component and its props
Movie Grid
Understand the grid layout system
Search Bar
Implement search functionality
Trailer Modal
Add video playback modals