Function component

Initialize a new Component optionally with initial data and a custom name.

Component component(T) (
  T data = T.init,
  const string name = ""
)
if (isStruct!T);

Parameters

NameDescription
data Initial data value.
name A custom name. Defaults to fullyQualifiedName!T.