Skip to content

Hydrate -> (PropertyTable) -> Instance

function Fusion.Hydrate(
    target: Instance
): (
    props: PropertyTable
) -> Instance

Given an instance, returns a component for binding extra functionality to that instance.

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.

Do not overwrite properties

If the instance was previously created with New or previously hydrated, do not assign to any properties that were previously specified in those prior calls. Duplicated assignments can interfere with each other in unpredictable ways.


Parameters

target : Instance

The instance which should be modified.


Returns -> (PropertyTable) -> Instance

A component that hydrates that instance, accepting various properties to build up bindings and operations applied to the instance.


Learn More

Back to top