Provider Pattern

Noun · Development

Definitions

  1. A React pattern that uses a Context Provider component to make shared state or services available to an entire component subtree, combined with a custom hook (e.g., useTheme, useAuth) for consumers to access that context — eliminating the need to pass props through intermediate components (prop drilling).

    In plain English: A way to share data across many components in a React app without passing it through every component in between.

    Example: "We use the provider pattern for auth — the AuthProvider wraps the app and useAuth() gives any component the current user."

Related Terms