Skip to content

Function: useAppStore()

useAppStore(pinia?, hot?): Store<"app", Pick<object, "isMobile" | "showLoading">, Pick<object, "isDark" | "themeColor" | "showToggleLocale">, Pick<object, "toggleDark" | "toggleDarkWithTransition">>

Global store for users

Parameters

pinia?: null | Pinia

Pinia instance to retrieve the store

hot?: StoreGeneric

dev only hot module replacement

Returns

Store<"app", Pick<object, "isMobile" | "showLoading">, Pick<object, "isDark" | "themeColor" | "showToggleLocale">, Pick<object, "toggleDark" | "toggleDarkWithTransition">>

Example

ts
import { useAppStore } from 'valaxy'
const appStore = useAppStore()

Defined in

packages/valaxy/client/stores/app.ts:13