Home > Software engineering >  Jetpack compose lazy column swapping a different list not updating
Jetpack compose lazy column swapping a different list not updating

Time:09-11

How can I swap list in jetpack compose? Viewmodel api fetch is triggering multiple times

CodePudding user response:

it seems when recomposition is happening, getting triggered multiple times.

testViewModel.fetchCountryList()

can you try this and check

 LaunchedEffect(Unit) {
        testViewModel.fetchCountryList()
    }
  • Related