This is a simple React application that demonstrates how to use props to pass data from a parent component to child components. The app includes a Header and Footer component, both of which receive and display data passed down from the App component using props.
- Functional components with props
- Clear separation of parent and child components
- Dynamic rendering of content using props
- Fixed header and footer with simple styling
- React functional components
propsfor parent-to-child communication- JSX syntax
- Basic CSS for layout
react-props-demo/
├── public/
├── src/
│ ├── components/
│ │ ├── Header.jsx
│ │ └── Footer.jsx
│ ├── App.jsx
│ ├── style.css
│ └── main.jsx
├── package.json
├── vite.config.js
└── README.md
- git clone https://github.com/your-username/react-props-demo.git
- cd react-props-demo
- npm install
-
npm run dev
-
Visit http://localhost:5173 to view the app in your browser.