Skip to content
On this page

useSalutations

Definition

Composable for fetching the salutations list.

Basic usage

ts
const { 
 getSalutations,
 mountedCallback,
 fetchSalutations 
} = useSalutations();

Signature

ts
export function useSalutations(): UseSalutationsReturn 

Return type

See UseSalutationsReturn
ts
export type UseSalutationsReturn = {
  mountedCallback(): Promise<void>;
  /**
   * All available salutations
   */
  getSalutations: ComputedRef<Salutation[]>;
  /**
   * Fetches the salutations list and assigns the result to the `salutations` property
   */
  fetchSalutations(): Promise<void>;
};

Properties

NameTypeDescription
getSalutations
ComputedRef<Array<Salutation>>
All available salutations

Methods

NameTypeDescription
mountedCallback
Promise<void>
fetchSalutations
Promise<void>
Fetches the salutations list and assigns the result to the `salutations` property
useSalutations has loaded