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

Function observeNodeUpdate

packages/debugger/src/dependency/collect.ts:35–41  ·  view source on GitHub ↗
(
    node: Solid.Computation | Solid.Memo | Solid.Signal,
    handler: VoidFunction,
)

Source from the content-addressed store, hash-verified

33export type OnNodeUpdate = typeof OnNodeUpdate
34
35function observeNodeUpdate(
36 node: Solid.Computation | Solid.Memo | Solid.Signal,
37 handler: VoidFunction,
38) {
39 if (isSolidOwner(node)) observeComputationUpdate(node, handler, $DGRAPH)
40 else observeValueUpdate(node, handler, $DGRAPH)
41}
42function unobserveNodeUpdate(node: Solid.Computation | Solid.Memo | Solid.Signal) {
43 if (isSolidOwner(node)) removeComputationUpdateObserver(node, $DGRAPH)
44 else removeValueUpdateObserver(node, $DGRAPH)

Callers 1

addNodeToGraphFunction · 0.85

Calls 3

isSolidOwnerFunction · 0.90
observeComputationUpdateFunction · 0.90
observeValueUpdateFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…