Import
import { PageContextProvider, usePageContext } from "veryfront/context";
Examples
import { PageContextProvider, usePageContext } from "veryfront/context";
Exports
Components
| Name | Description | Source |
|---|---|---|
PageContextProvider | Provides page context to route and MDX descendants. Page-authored fields (frontmatter, slug, headings) come from the pageContext prop; the location fields (path, query, params) are derived from the router so they stay reactive and there is a single source of truth - usePageContext() exposes the same query/pathname as useRouter(). When rendered outside a RouterProvider (no live router) it falls back to the seed’s own location. | source |
Functions
| Name | Description | Source |
|---|---|---|
usePageContext | Reads the current page context. | source |