Skip to main content
Version: 2.0.0-beta.19 🚧

Class: ReactContextError

docusaurus-theme-common/lib.ReactContextError

This error is thrown when a context is consumed outside its provider. Allows reusing a generic error message format and reduces bundle size. The hook's name will be extracted from its stack, so only the provider's name is needed.

Hierarchy

  • Error

    ReactContextError

Constructors

constructor

new ReactContextError(providerName, additionalInfo?)

Parameters

NameType
providerNamestring
additionalInfo?string

Overrides

Error.constructor

Defined in

packages/docusaurus-theme-common/lib/utils/reactUtils.d.ts:40