Skip to main content

Interface: UseFavoritesOptions

Defined in: composables/react/useFavorites.ts:37

Properties

graphqlClient

graphqlClient: GraphQLClient

Defined in: composables/react/useFavorites.ts:39

GraphQL client the hook derives its Services bundle from.


language?

optional language?: string

Defined in: composables/react/useFavorites.ts:43

Language for list operations.


onCreate?

optional onCreate?: (data) => void

Defined in: composables/react/useFavorites.ts:45

Override: fires instead of the default createFavoriteList call.

Parameters

data

FavoriteListFormData

Returns

void


onDelete?

optional onDelete?: (id) => void

Defined in: composables/react/useFavorites.ts:49

Override: fires instead of the default deleteFavoriteList call.

Parameters

id

string

Returns

void


onEdit?

optional onEdit?: (id, data) => void

Defined in: composables/react/useFavorites.ts:47

Override: fires instead of the default updateFavoriteList call.

Parameters

id

string

data

FavoriteListFormData

Returns

void


onListChanged?

optional onListChanged?: (change?) => void

Defined in: composables/react/useFavorites.ts:59

Called after a list mutation succeeds.

The change argument is optional so existing zero-argument callbacks keep working, but without it a host cannot tell a create from a delete — which makes the hook useless for analytics, audit trails or optimistic UI that needs to know WHAT happened rather than merely THAT something did.

Parameters

change?

FavoriteListChange

Returns

void


user

user: AnyUser

Defined in: composables/react/useFavorites.ts:41

The signed-in user; favorite lists are read off this object.