MCPcopy Create free account
hub / github.com/thetarnav/solid-devtools / onComputationUpdate

Function onComputationUpdate

packages/debugger/src/structure/index.ts:60–73  ·  view source on GitHub ↗
(
        root_id, owner, changed_structure,
    )

Source from the content-addressed store, hash-verified

58 let shouldUpdateAllRoots = true
59
60 const onComputationUpdate: walker.ComputationUpdateHandler = (
61 root_id, owner, changed_structure,
62 ) => {
63 // separate the callback from the computation
64 queueMicrotask(() => {
65 if (!props.enabled()) return
66 if (changed_structure) {
67 let owner_to_update = getClosestIncludedOwner(owner, treeWalkerMode) ?? owner
68 updateOwner(owner_to_update, root_id)
69 }
70 let id = getSdtId(owner, ObjectType.Owner)
71 props.onNodeUpdate(id)
72 })
73 }
74
75 function forceFlushRootUpdateQueue(): void {
76

Callers 1

handlerFunction · 0.85

Calls 3

getSdtIdFunction · 0.90
getClosestIncludedOwnerFunction · 0.85
updateOwnerFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…