Trying to integrate 2.2.0-beta-3 into my project and interesting if activity is subclass of
ScopeActivity
and has field defined like this
private val splashVM by scope.viewModel<SplashViewModel>()
it failed with
Caused by: java.lang.IllegalStateException: Your activity is not yet attached to the Application instance. You can't request ViewModel before onCreate call.
Am I understand incorrectly that
by scope.viewModel
should be called only while I’m calling
splashVM
somewhere later in my code? And I only calling
splashVM
inside
onCreate
but for some reason it still failed and seems to call scope right away on activity init method call.
@arnaud.giuliani should I use it somehow differently now?