FormKit Observer is a utility to wrap a FormKitNode in a dependency tracking observer proxy.
Creates the observer.
node
— The FormKitNode to observe.dependencies
— The dependent nodes and the events that are required to watch for changes.Returns a FormKitObservedNode.
Determines which nodes should be added as dependencies and which should be removed.
previous
— The previous watcher dependencies.current
— The new/current watcher dependencies.A tuple of maps: toAdd
and toRemove
.
Checks if the given node is revoked.
node
— Any observed node to check.A boolean
indicating if the node is revoked.
Remove all the receipts from the observed node and subtree.
receipts
— The FormKit observer receipts to remove.An API-compatible FormKitNode that is able to determine the full dependency tree of nodes and their values.
A callback to watch for nodes.