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.