React is a component-based JavaScript library for building interactive, dynamic user interfaces. This module covers React fundamentals and modern practices with hooks.
- ✅ Components (Functional & Class)
- ✅ JSX (JavaScript XML)
- ✅ Props and State
- ✅ Hooks (useState, useEffect, useContext)
- ✅ Component Lifecycle
- ✅ Event Handling
- ✅ Forms and Validation
- ✅ List Rendering
React/
├── README.md
├── Notes/
│ ├── ReadmeNote/
│ │ ├── 0.Introduction.md
│ │ ├── Day_1.md
│ │ └── Day_2.md
│ └── Day_1/
│ └── Images/
├── Basics/
│ ├── README.md
│ ├── src/
│ │ ├── App.jsx
│ │ ├── components/
│ │ └── assets/
│ ├── package.json
│ └── vite.config.js
└── Projects/
└── [React projects]
// Functional Component
function Welcome(props) {
return <h1>Hello, {props.name}</h1>;
}
// ES6 Arrow Function
const Welcome = (props) => <h1>Hello, {props.name}</h1>;const element = (
<div>
<h1>Title</h1>
<p>Description</p>
</div>
);// Props (read-only)
function Greeting({ name }) {
return <h1>Hello, {name}!</h1>;
}
// State
function Counter() {
const [count, setCount] = useState(0);
return (
<div>
<p>Count: {count}</p>
<button onClick={() => setCount(count + 1)}>Increment</button>
</div>
);
}// useState
const [state, setState] = useState(initialValue);
// useEffect
useEffect(() => {
// Side effects here
return () => {
// Cleanup
};
}, [dependencies]);
// useContext
const value = useContext(MyContext);- Understand Components - Building blocks of React
- Learn JSX - JavaScript + XML syntax
- Master State & Props - Data management
- Explore Hooks - Modern React patterns
- Build Projects - Apply knowledge
- Counter Component
- Todo List
- Component Lifecycle Demo
- Hook Examples
# Create new React app with Vite
npm create vite@latest my-app -- --template react
cd my-app
npm install
npm run devReady to build dynamic interfaces with React? Let's start! 🚀
React is the industry-standard framework for modern web development!