Android-CleanArchitecture-Kotlin icon indicating copy to clipboard operation
Android-CleanArchitecture-Kotlin copied to clipboard

how it works viewmodel{observe,failure}

Open aaghan opened this issue 5 years ago • 0 comments

moviesViewModel = viewModel(viewModelFactory) { observe(movies, ::renderMoviesList) failure(failure, ::handleFailure) }

Taking this example, this viewmodel moves to the method renderMoviesList on success and handleFailure on failure.

But how is this defined in generic type, about the method and params it shall be moving towards?

aaghan avatar Apr 09 '20 18:04 aaghan