Melon-dbMelon-db
API reference@melon-db/db-react

useFindFirst

@melon-db/db-react — useFindFirst

@melon-db/db-react API Reference


Function: useFindFirst()

useFindFirst<T>(collection, args?, options?): T | null

Defined in: hooks.ts:301

Reactive Prisma-style findFirst hook.

Type Parameters

Type ParameterDefault type
T extends Record<string, unknown>Record<string, unknown>

Parameters

ParameterType
collectionstring
args?PrismaFindManyArgs
options?UseQueryOptions<T, T[]>

Returns

T | null