---
title: "Comment by Roger Colque Calcina on \"Building a Modern News App with MVVM, Retrofit, Hilt, Pagging and Jetpack Compose in Kotlin\" | Hashnode"
description: "hello i saw other way @Module @InstallIn(SingletonComponent::class) object RepositoriesModule { @Provides @Singleton fun provideNewsRepository( apiService: News"
url: "https://hashnode.com/posts/building-a-modern-news-app-with-mvvm-retrofit-hilt-pagging-and-jetpack-compose-in-kotlin/666fc6aefe878451586b3461/comment/68a743597f8193438fa681ce"
---

[Discussion](https://hashnode.com/posts/building-a-modern-news-app-with-mvvm-retrofit-hilt-pagging-and-jetpack-compose-in-kotlin/666fc6aefe878451586b3461)

Comment [Building a Modern News App with MVVM, Retrofit, Hilt, Pagging and Jetpack Compose in Kotlin](https://hashnode.com/posts/building-a-modern-news-app-with-mvvm-retrofit-hilt-pagging-and-jetpack-compose-in-kotlin/666fc6aefe878451586b3461)

[Roger Colque Calcina](https://hashnode.com/@rogergcc)

[Aug 21, 2025](https://hashnode.com/posts/building-a-modern-news-app-with-mvvm-retrofit-hilt-pagging-and-jetpack-compose-in-kotlin/666fc6aefe878451586b3461/comment/68a743597f8193438fa681ce)

hello i saw other way @Module @InstallIn(SingletonComponent::class) object RepositoriesModule {

@Provides @Singleton fun provideNewsRepository( apiService: NewsApiService ): NewsRepository = NewsRepositoryImpl ( apiService) } -

class NewsRepositoryImpl ( private val apiService: NewsApiService

) : NewsRepository {....

VS

@Module @InstallIn(SingletonComponent::class) abstract class RepositoryModule {

@Binds abstract fun bindNewsRepository( impl: NewsRepositoryImpl ): NewsRepository } -

class NewsRepositoryImpl @Inject constructor( private val apiService: NewsApiService

) : NewsRepository {....

Basically use bind for repos and singleton only for retrofit room

why not this way?
