isRef 判定示例
| 表达式 | 类型 | isRef | 当前值 |
|---|---|---|---|
ref(count) | 可写 ref | 1 | |
shallowRef({ label }) | 浅层 ref | shallow | |
computed(() => count * 2) | 计算 ref | 2 | |
computed(() => state.getPath('name')) | 路径派生值 | Rue | |
{ value: ... } | 普通对象 | looks like a ref | |
signal({ name }) | Signal 句柄 | Rue |
| 表达式 | 类型 | isRef | 当前值 |
|---|---|---|---|
ref(count) | 可写 ref | 1 | |
shallowRef({ label }) | 浅层 ref | shallow | |
computed(() => count * 2) | 计算 ref | 2 | |
computed(() => state.getPath('name')) | 路径派生值 | Rue | |
{ value: ... } | 普通对象 | looks like a ref | |
signal({ name }) | Signal 句柄 | Rue |