Component type since v0.2 ¶
The standard type signature for UI components. They accept a property table and return a child type.
(props: {[any]: any}) -> Child
Example Usage¶
-- create a Button component
local function Button(props)
return New "TextButton" {
Text = props.Text
}
end
-- the Button component is compatible with the Component type
local myComponent: Component = Button