跳到主要内容

useFindOne()

function useFindOne<T>(EntityType, options): RxDBResource<InstanceType<T> | undefined>;

Defined in: rxdb-react/src/hooks.ts:186

查找第一个匹配实体。

Type Parameters​

Type Parameter
T extends EntityType

Parameters​

ParameterTypeDescription
EntityTypeT实体类型。
optionsUseOptions<EntityStaticType<T, "findOneOptions">>findOne 查询选项或幂等 factory。

Returns​

RxDBResource<InstanceType<T> | undefined>

未匹配时 value 为 undefined 的查询资源。