Tech TutorBangla Web Documentation
Portfolio
HomeHTMLCSSTailwind CSSJavaScriptTypeScriptReactNext.jsNode.jsExpressSocket.IOExpoWordPressPostgreSQLPrismaPostgresNestJSMongoDBDockerTanStackTanStack TableRTK QueryGitGitHub
  • React Documentation22টি অধ্যায়
প্রযুক্তি নির্বাচন
HomeHTMLCSSTailwind CSSJavaScriptTypeScriptReactNext.jsNode.jsExpressSocket.IOExpoWordPressPostgreSQLPrismaPostgresNestJSMongoDBDockerTanStackTanStack TableRTK QueryGitGitHub
  • Introduction
  • কেন React?
  • JSX
  • Component & Props
  • Conditional Rendering
  • Lists & Keys
  • Events
  • State (useState)
  • Forms
  • Lifting State
  • useEffect
  • useRef
  • Context
  • useReducer
  • Memoization
  • Custom Hooks
  • Children & Props
  • Error Boundaries
  • Portals & Fragments
  • Data Fetching
  • Performance
  • Todo Project
  1. Docs
  2. React
  3. Component ও Props
ReactBeginner

Component ও Props

Function component, props destructure, default value, children — বাংলায়।

9টি অংশবাংলা ভাষায়

Component তৈরি

Function componentjsx
jsx
function Welcome(props) {
  return <h1>স্বাগতম, {props.name}!</h1>;
}

// arrow function-ও চলে
const Welcome = (props) => <h1>স্বাগতম, {props.name}!</h1>;

export default Welcome;

Props

Props হলো component-এ পাঠানো arguments (HTML attribute-এর মতো)। Props read-only — component নিজে বদলায় না, উপরে থেকে পরিবর্তন হয়।

Props destructurejsx
jsx
function UserCard({ name, age = 0, isAdmin = false }) {
  return (
    <div className="card">
      <h3>{name}</h3>
      <p>বয়স: {age}</p>
      {isAdmin && <span>ADMIN</span>}
    </div>
  );
}

<UserCard name="রহিম" age={24} isAdmin />

children

children propjsx
jsx
function Card({ children, title }) {
  return (
    <section className="card">
      <h2>{title}</h2>
      {children}
    </section>
  );
}

<Card title="ব্যবহারকারী">
  <p>ভেতরের content — children হিসেবে আসে</p>
</Card>

Component মূলনীতি

  • Component নাম Capitalize হতে হয়
  • Props function বা element-ও হতে পারে
  • Props change হলে component re-render হয়
  • Child-এর ডেটা বদলাতে চাইলে parent-এ callbacks পাঠান — lifting state
শেষ প্যারায় নিজে practice করুন — কোড কপি করে নিজের এডিটরে চালিয়ে দেখুন।
আগেরJSX ও React ElementপরেরConditional Rendering
এই পেজে
Tech Tutor

বাংলায় ওয়েব ডেভেলপমেন্ট ডকুমেন্টেশন শিখুন — ধাপে ধাপে।

Homeসব ডকুমেন্টেশনQuick Startআমার নোটস

© 2026 Tech Tutor. বাংলায় শিখুন, বাংলায় গড়ুন।

mdanamolhasan1998@gmail.com