📄 computedEager¶
📊 Analysis Summary¶
| Metric | Count |
|---|---|
| 🔧 Functions | 1 |
| 📦 Imports | 5 |
| 📊 Variables & Constants | 1 |
| 📑 Type Aliases | 2 |
📚 Table of Contents¶
🛠️ File Location:¶
📂 packages/shared/computedEager/index.ts
📦 Imports¶
| Name | Source |
|---|---|
ShallowRef |
vue |
WatchOptionsBase |
vue |
deepReadonly |
vue |
shallowRef |
vue |
watchEffect |
vue |
Variables & Constants¶
| Name | Type | Kind | Value | Exported |
|---|---|---|---|---|
eagerComputed |
<T>(fn: () => T, options?: WatchOptio... |
const | computedEager |
✓ |
Functions¶
computedEager(fn: () => T, options: ComputedEagerOptions): ComputedEagerReturn<T>¶
⚠️ DEPRECATED: This function will be removed in future version.
Note: If you are using Vue 3.4+, you can straight use computed instead. Because in Vue 3.4+, if computed new value does not change, computed, effect, watch, watchEffect, render dependencies will not be triggered. refer: https://github.com/vuejs/core/pull/5912
Parameters:
fnany: effect functionoptionsany: WatchOptionsBase
Returns: undefined
readonly shallowRef
Raw JSDoc
/**
*
* @deprecated This function will be removed in future version.
*
* Note: If you are using Vue 3.4+, you can straight use computed instead.
* Because in Vue 3.4+, if computed new value does not change,
* computed, effect, watch, watchEffect, render dependencies will not be triggered.
* refer: https://github.com/vuejs/core/pull/5912
*
* @param fn effect function
* @param options WatchOptionsBase
* @returns readonly shallowRef
*/
Calls:
shallowRef (from vue)watchEffect (from vue)fndeepReadonly (from vue)
Code
Type Aliases¶
ComputedEagerOptions¶
ComputedEagerReturn<T = any>¶
Generated by Syntax Scribe