Compose Multiplatform iOS

Sdílet
Vložit
  • čas přidán 16. 08. 2023
  • #jetpackcompose #android #composemultiplatform #kotlinmultiplatform
  • Věda a technologie

Komentáře • 3

  • @vaibhavpatil8297
    @vaibhavpatil8297 Před 8 měsíci

    The most important question right now is how to do dependency injection in viewModel , like you normally have repoisitory dependency in viewModel, how to handle di here, please give me some idea

    • @odayprogrammer
      @odayprogrammer  Před 8 měsíci

      well, you use Hilt, you specify a RepositoryModule for Hilt in which you provide the repository you want, and then in the viewmodel you say class MyViewModel @Inject constructor(val myRepository: Repository): ViewModel(), done

    • @arsildo
      @arsildo Před 7 měsíci +1

      I made an app with Compose MP and koin, precompose, datastore ect its just like building an android app basically, precompose is very very similar to compose navigation and di with koin is exactly the same