New -> (PropertyTable) -> Instance ¶
function Fusion.New(
className: string
): (
props: PropertyTable
) -> Instance
Given a class name, returns a component for constructing instances of that class.
In the property table, string keys are assigned as properties on the instance. If the value is a state object, it is re-assigned every time the value of the state object changes.
Any special keys present in the property table are
applied to the instance after string keys are processed, in the order specified
by their stage
.
A special exception is made for assigning Parent
, which is only assigned after
the descendants
stage.
Parameters¶
className : string ¶
The kind of instance that should be constructed.
Returns -> (PropertyTable) -> Instance ¶
A component that constructs instances of that type, accepting various properties to customise each instance uniquely.