Building Reusable Components:
Learn how to create reusable and independent pieces of UI, like buttons, forms, and headers, that can be combined to build larger applications.
Managing Data with State:
Understand how to use React’s useState and useEffect hooks to handle data and updates dynamically, such as changing text or loading new content.
Navigation with React Router:
Create seamless navigation between different pages or views in a single-page application without reloading the page.
Connecting to APIs:
Learn to fetch and display data from servers, such as showing user profiles or submitting forms, using tools like fetch or Axios.
<import { useState } from 'react'>
<import reactLogo from './assets/react.svg'>
<import './App.css'>
<import Hello from "./component/Hello";>
function App() {
const seatNumbers = [1, 5, 8];
return <div className="App">
<Hello name="Nishchay!!" message="Hi there," seatNumbers={seatNumbers} />
</div>
}
const [count, setCount] = useState(0);
return (
<div className="App">
<div>
<h1>Welcome to WT Lab Morning</h1>
<p>If you are absent for today's class then you are not allowed to write the exam.</p>
</div>
</div>
);
export default App;
function MyButton() {
return (
<button>I'm a button</button>
);
}
const products = [
{title: 'Cabbage', isFruit: false, id: 1},
{title: 'Garlic', isFruit: false, id: 2},
{title: 'Apple', isFruit: true, id: 3},
];
export default function ShoppingList() {
const listItems = products.map(product => (
<li key={product.id} style={{color: product.isFruit ? 'magenta' : 'darkgreen'}}>
{product.title}
</li>
));
return (<ul>{listItems}</ul>);
}