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
| Parameter | Type | Description |
|---|---|---|
EntityType | T | 实体类型。 |
options | UseOptions<EntityStaticType<T, "findOneOptions">> | findOne 查询选项或幂等 factory。 |
Returns
RxDBResource<InstanceType<T> | undefined>
未匹配时 value 为 undefined 的查询资源。