Just thought that Inputs could take a function as ...
# ballast
a
Just thought that Inputs could take a function as a parameter, then I could keep logic in the VM, and inputs could handle... Inputs only. Right now, all VMs have no body.
c
I’d recommend against putting anything in the VM. Part of the intention with Ballast’s setup is that the VM class itself matters very little, and is mostly just the bridge to the platform you’re using it on. In fact, I’ve been moving more toward defining my “viewModels” as a typealias in the common module, rather than keeping them in the platform-specific modules, to help enforce that the actual ViewModel class is not important, and is not the right place to put logic
a
well my whole app leaves in kotlin commonMain spread across multiple modules. not much platform-specific code yet. Yeah ballast vm works like bridge in your approach glueing it all together.