Directive
Types
Node type
type Node = Graph.Node<any>Tag type
type Tag = Node | string | (() -> string | { string })tagValue type
Functions
attr
Directive.attr(attribute: { [string]: any } | string, value: any?): anyOne-off form of the _ATTR directive: place Flux.attr("Name", value) or Flux.attr { Name = value } anywhere in the array portion of a property table to set or bind Roblox attributes on the Instance. Accepts the same values as _ATTR (static values, reactive nodes, functions, and Flux.model).
event
Directive.event(event: { [string]: any } | string, handler: ((...any) -> ()) | Node | nil): anyOne-off form of the _EVENT directive: place Flux.event("Name", handler) or Flux.event { Name = handler } anywhere in the array portion of a property table to connect listeners or bind values from the Instance into nodes. Accepts the same values as _EVENT, including a nested _ATTR map for attribute-changed listeners.
onDestroy
Directive.onDestroy(...: any): anyOne-off form of the _CLEAN directive: place Flux.onDestroy(...) anywhere in the array portion of a property table to tie extra teardown (functions, connections, instances, scopes, or arrays of these) to the Instance's Destroying lifetime. Distinct from Flux.cleanup, which registers a callback on the current reactive owner instead.
ref
One-off form of the _REF directive: place Flux.ref(nodeOrCallback) anywhere in the array portion of a property table to receive the built Instance. A node is set to the instance; a callback receives it and may return a cleanup value tied to the instance's lifetime.
tag
Directive.tag(...: tagValue): anyOne-off form of the _TAG directive: place Flux.tag(...) anywhere in the array portion of a property table to manage CollectionService tags on the Instance. Each argument accepts the same values as _TAG: a string, a reactive node or function whose value is a tag or array of tags (diffed on change), or an array of any of these.