DocsReferenceFunctionsuseApp

useApp

The useApp function is a React hook that returns various information about your site.

Usage

Use useApp hook can be used in any React component.

import { useApp } from "builderoo";
 
const { locale, menu, publicAssetPrefix, isDevelopMode, isEditorMode } = useApp()

Return Values

NameTypeDescription
localeLocaleCurrent locale information.
menuMenuSite menus.
publicAssetPrefixstringURL prefix for assets in the 'public' directory.
isDevelopModebooleanTrue when run in development.
isEditorModebooleanTrue when in edit mode in the theme editor.