Vue Tracking Setup State

Vue Reactivity Graph 插件的 setupState 追蹤知識。說明如何識別 component setupState 裡的 ref / reactive / computed,以及 valNodeMap(WeakMap<rawObject, GraphNode>)的建立與查找方式。涉及 collectSetupState、bindSetupTrack、onTrack event 處理、valNodeMap 查找邏輯時載入。 Use when this capability is needed.

tomevault-io Updated

File contents

Tracking: setupState(ref / reactive / computed)

每個 component instance 自己建立的 ref/reactive/computed,物件引用天生唯一。

  • valNodeMap: WeakMap<rawObject, GraphNode>
  • event.target 直接命中,沒有衝突問題

Source: allenstu6311/Vue-reactivity-graph — distributed by TomeVault.

tomevault-io/skills-registry/tree/main/allenstu6311--vue-reactivity-graph--vue-tracking-setup-state commit fdc9c5757d

Frequently asked questions

npx skillmds@latest add tomevault-io/vue-tracking-setup-state