Component
Definition
A reusable, self-contained piece of UI in React. Components accept inputs (props) and return JSX describing what should appear on screen. Can be functions (recommended) or classes.
Code Example
Learn More
Related Terms
A syntax extension for JavaScript that looks like HTML and is used to describe UI in React. JSX is compiled to React.createElement() calls. It supports JavaScript expressions inside curly braces {}.
PropsShort for properties — the mechanism for passing data from parent to child components in React. Props are read-only and flow downward (one-way data flow). Destructure props in function parameters for clean code.
StateData that a component manages internally and can change over time. When state updates, React re-renders the component. Use useState for simple state and useReducer for complex state logic.