useGet()
function useGet<T>(EntityType, options): RxDBResource<InstanceType<T> | undefined>;
Defined in: rxdb-react/src/hooks.ts:168
通过 ID 获取单个实体。
Type Parameters
| Type Parameter |
|---|
T extends EntityType |
Parameters
| Parameter | Type | Description |
|---|---|---|
EntityType | T | 实体类型。 |
options | UseOptions<EntityStaticType<T, "getOptions">> | get 查询选项或幂等 factory。 |
Returns
RxDBResource<InstanceType<T> | undefined>
未找到时 value 为 undefined 的查询资源。