type ViewModelExample = {
character: Input<Artboard<Data.Character>>,
instance: Artboard<Data.Character>?,
}
function init(self: ViewModelExample, context: Context): boolean
local vm = Data.Character.new()
self.instance = self.character:instance(vm)
return true
end
return function(): Node<ViewModelExample>
return {
character = late(),
instance = nil,
init = init,
}
end