Bind
Properties
MODEL_SYMBOL Read Only
Bind.MODEL_SYMBOL: anyFunctions
applyLayoutOrder
Bind.applyLayoutOrder(child: Instance, order: number): numbermodel
Bind.model<T>(node: Graph.Node<T>): TWraps a reactive node for two-way binding. Assigning Flux.model(node) to a property (or attribute) drives the Instance from the node AND writes the node back whenever the user changes that property, the terse equivalent of assigning the node and repeating it under _EVENT. Only sound for properties that fire a changed signal (e.g. TextBox.Text).
children
Bind.children<T>(node: Graph.Node<T>, parent: Instance, layoutOrder: number?): () -> ()Reactively parents the node's value (a child Instance or an array of them) under parent, swapping in the new set and unparenting the old whenever the node updates. layoutOrder is the starting LayoutOrder, auto-assigned to each child that still has the default 0. Returns a disconnect that severs the binding and clears the parented children.
listen
Bind.listen<T>(node: Graph.Node<T>, fn: (value: T) -> ()): () -> ()Registers fn to run on each update of the node, with RBXScriptSignal:Connect semantics: each invocation runs on its own thread (via task.spawn), so callbacks may yield freely. Returns an unsubscribe. For synchronous reactive observation, use an effect instead.
from
Bind.from<T>(node: Graph.Node<T>, instance: Instance, property: string, isAttribute: boolean?)Drives the node's value from a property or attribute on a Roblox Instance: seeds the current value and keeps it in sync via the instance's changed signal. Returns the node and a disconnect.
Parameters
property: The property or attribute name; a leading$marks it an attribute whenisAttributeis nil.isAttribute: Forces attribute (true) or property (false) lookup, bypassing the$convention.
node
Bind.node<T>(obj: (() -> T) | T, effectOrProperty: boolean? | string?): Graph.Node<T>The core constructor behind Flux(...): wraps a static value or a computation in a new node, or (when obj is a Roblox Instance) binds a new node from one of its properties or attributes. A function obj becomes a computed, or an effect when effectOrProperty is true.
on
Bind.on<D, R>(deps: any, fn: (input: any, prevInput: any?, prevResult: R?) -> R, defer: boolean?): (prevResult: R?) -> R?Builds an explicit-dependency reaction: it tracks only deps (a single node/function/value or an array of them) and runs fn untracked whenever one changes, so reads inside fn never become dependencies. Wrap it in a computed or effect; fn receives the current input, the previous input, and its own previous result. Set defer to skip the first run and react only to subsequent changes.
Parameters
deps: The dependency, or array of dependencies, to react to.fn: The reaction, run untracked, receiving(input, prevInput, prevResult).defer: Skip the initial run, firing only on later changes.
to
Bind.to<T>(node: Graph.Node<T>, instance: Instance, property: string, isAttribute: boolean?)Binds the node's value to a property or attribute on a Roblox Instance: writes the current value now and on every update. Returns an unbind that detaches this binding without affecting other bindings on the same instance.
Parameters
property: The property or attribute name to write.isAttribute: Whentrue, writes a Roblox attribute viaSetAttribute; otherwise sets the property directly.