Bind
Functions
model
Bind.model<T>(node: { read get: (any) -> T, read peek: (any) -> T, read set: (any, ...any) -> any }): TWraps a reactive node for two-way binding on an Instance property, attribute, or tag. Updates the instance from node and writes changes back to node when the instance fires its changed signal.
isModel
Bind.isModel(value: unknown): booleanReturns true when value is a Flux.model wrapper.
modelNode
Bind.modelNode(value: unknown): Graph.Node<any>?Returns the underlying node from a Flux.model wrapper, or nil if value is not a model.
local node = Flux.modelNode(props.value)
if node then
node:set(text)
endlisten
Bind.listen<T>(node: Graph.Node<T>, fn: (value: T) -> ()): () -> ()Subscribes fn to updates of node with RBXScriptSignal:Connect semantics and returns an unsubscribe function. Fires on each flush after node changes, spawning fn(value) on its own thread via task.spawn so callbacks may yield freely.
fromSignal
Bind.fromSignal(sig: any, initial: any): Graph.Node<any>Creates a node updated from the first argument of an RBXScriptSignal or signal table with :Connect() / :connect(), seeding from initial and deduplicating equal values. Disconnects automatically when the node or its owning scope is destroyed.
property
Bind.property<I, K>(instance: I & Instance, property: K | "Name"): Graph.Node<Type.PropertyType<I, K>>Creates a node mirroring an Instance property, an attribute ($Name or _attr_Name), or a CollectionService tag (#Tag or _tag_Tag). Disconnects automatically when instance, the node, or its owning scope is destroyed.
local text = Flux.property(textBox, "Text")
local health = Flux.property(character, "$Health")
local isEnemy = Flux.property(character, "#Enemy")on
Bind.on<D, R>(deps: D, fn: (input: Type.OnInput<D>, prevInput: Type.OnInput<D>?, prevResult: R?) -> R, defer: boolean?): (prevResult: R?) -> R?portal
Bind.portal(target: Graph.Reactive<Instance?>, children: any): PortalCreates a portal mounting children into target (static Instance or reactive target node) without transferring ownership of target. Mounted children are unparented when the owning scope tears down, the target changes, or the portal host is destroyed.