https://kotlinlang.org logo
#kotlin-inject
Title
# kotlin-inject
s

Sudhanshu Singh

10/10/2023, 5:03 PM
I am struggling to migrate from hilt to kotlin-inject. Could anyone help with converting the sample hilt code to kotlin-inject hilt
Copy code
@Module
@InstallIn(SingletonComponent::class)
class RepoModule {
    @Provides
    @Singleton
    fun provideRepo(
        remoteDataSource: UserRemoteDataSource,
        localDataSource: UserLocalDataSource
    ): UserRepo =
        UserRepoImpl(
            remoteDataSource,
            localDataSource
        )
}
6 Views