useEffect
Definition
A React hook for performing side effects in function components — fetching data, setting up subscriptions, or manually updating the DOM. Runs after every render by default; use the dependency array to control when it runs.
Code Example
Learn More
Related Terms
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.
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.
useMemoA React hook that memoizes the result of an expensive computation, recomputing only when its dependencies change. Use it to optimize performance by avoiding unnecessary recalculations on every render.