interface CreateContextOptions {
    errorMessage?: string;
    name?: string;
    strict?: boolean;
}

Properties

errorMessage?: string

Error message to throw if the context is undefined

name?: string

The display name of the context

strict?: boolean

If true, React will throw if context is null or undefined In some cases, you might want to support nested context, so you can set it to false