@dxos/react-ui
    Preparing search index...

    Variable createContextConst

    createContext: <ContextValueType extends object | null>(
        rootComponentName: string,
        defaultContext?: ContextValueType,
    ) => readonly [
        FC<ContextValueType & { children?: ReactNode }>,
        (consumerName: string) => ContextValueType,
    ]

    A typed context whose provider takes the context fields as props. useContext throws a message naming the consumer and root when no provider is mounted and no default was given.

    Type declaration