Hooks
CMS Hooks
Section titled “CMS Hooks”Custom React hooks provide reusable logic for common CMS operations.
Common Hooks
Section titled “Common Hooks”useEntity
Section titled “useEntity”Generic hook for entity CRUD operations:
const { data, loading, error, create, update, delete } = useEntity('pages');useLocale
Section titled “useLocale”Manages current locale and translations:
const { locale, setLocale, t } = useLocale();useAuth
Section titled “useAuth”Authentication state and user management:
const { user, login, logout, hasPermission } = useAuth();useMedia
Section titled “useMedia”Media upload and management:
const { upload, files, loading } = useMedia();Form Hooks
Section titled “Form Hooks”useForm
Section titled “useForm”Form state management with validation:
const { register, handleSubmit, errors } = useForm(schema);This section will be expanded with detailed hook implementations.