MCPcopy
hub / github.com/chakra-ui/ark / getErrorMessage

Function getErrorMessage

packages/react/src/utils/create-context.ts:15–17  ·  view source on GitHub ↗
(hook: string, provider: string)

Source from the content-addressed store, hash-verified

13type CreateContextReturn<T> = [React.Provider<T>, () => T, React.Context<T>]
14
15function getErrorMessage(hook: string, provider: string) {
16 return `${hook} returned \`undefined\`. Seems you forgot to wrap component within ${provider}`
17}
18
19export function createContext<T>(options: CreateContextOptions<T> = {}) {
20 const {

Callers 1

useContextFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected