Skip to content

VexConfigContext

const VexConfigContext: Context<{ admin: { sidebar: { collapsible: "none" | "offcanvas" | "icon"; side: "left" | "right"; }; }; auth?: { collections: object[]; name: string; userCollection: string; }; basePath: string; collections: object[]; globals: object[]; mediaCollections: object[]; schema: { outputPath: string; }; storage?: { adapters: object[]; }; types: { outputPath: string; }; }>

Defined in: packages/react/src/context/VexConfigContext.ts:16

Holds the live VexCMS config for the duration of the admin session.

Populated by AdminLayout from the config prop. Because the user’s layout.tsx is a “use client” module that imports vex.config directly, Turbopack’s Fast Refresh re-evaluates it when any collection file changes — which updates this context and re-renders all consumers, including CollectionListView and CreateDocumentModal, without a full page reload.