Mavericks View Model Config Factory
Factory for providing the MavericksViewModelConfig for each new ViewModel that is created.
An instance of this must be set on Mavericks.viewModelConfigFactory.
A custom subclass of this may be used to allow you to override buildConfig, but this should generally not be necessary.
Constructors
Sets debugMode depending on whether the app was built with the Debuggable flag enabled.
Functions
Add a listener that will be called every time a MavericksViewModelConfig is created for a new view model. This will happen each time a new ViewModel is created.
Create a new MavericksViewModelConfig for the given viewmodel. This can be overridden to customize the config.
Properties
True if debug checks should be run. Should be false for production builds. When true, certain validations are applied to the ViewModel. These can be slow and should not be used in production! However, they do help to catch common issues so it is highly recommended that you enable debug when applicable.
Provide an additional context that will be used in the CoroutinesStateStore. All withState/setState calls will be executed in this context. By default these calls are executed with a shared thread pool dispatcher that is private to CoroutinesStateStore
Provide a context that will be added to the coroutine scope when a subscription is registered (eg MavericksView.onEach).