Skip to main content

UsePageMetadata

usePageMetadata

Provides functions for setting the current page title and breadcrumb.

Example

import { usePageMetadata } from '@vendure/admin-ui/react';
import { useEffect } from 'react';

export const MyComponent = () => {
const { setTitle, setBreadcrumb } = usePageMetadata();
useEffect(() => {
setTitle('My Page');
setBreadcrumb([
{ link: ['./parent'], label: 'Parent Page' },
{ link: ['./'], label: 'This Page' },
]);
}, []);
// ...
return <div>...</div>;
}
Signature
function usePageMetadata(): void