Jetpack Compose - Side Effects | Launched Effect With Example | CheezyCode Hindi

preview_player
Показать описание
Learn Jetpack Compose in Android. Learn what are side effects in Jetpack Compose. Learn how to handle side effects in controlled and predictable manner. Running code inside composable have unpredictable behavior because composable can run multiple times and you do not have control over it. Side Effects are the changes that effects the app state that are outside the scope of composable function. We want to run side effects in controlled manner that results in predictable behavior. For this we have different Effect Handlers in Jetpack Compose. Launched Effect handler will execute the code in a coroutine scope + will execute code based on the key. It will be called during initial composition and will run whenever key parameter changes.

In this video, I have covered different examples to learn about side effects and how to handle these side effects using LaunchedEffect Handler. Learn step by step on how to define Composable functions along with the best practice. Everything is explained in Hindi (हिन्दी)

Topics covered -
1. Side Effects in Jetpack Compose.
2. Recomposition with Side Effects
3. Side Effect Handlers with Example.
4. LaunchedEffect in Jetpack Compose with Example.

Kotlin Flows Playlist -

Jetpack Paging Tutorial -

Complete Dependency Injection Playlist Link -

Complete Android Architecture Components Playlist -

Beginner series in Android Playlist (Hindi) -

Kotlin Beginners Tutorial Series -

For more info - visit the below link

We are social. Follow us at -
Рекомендации по теме
Комментарии
Автор

I am old timer Android developer who has seen the android evolution since ginger bread versions till now. Worked on multiple MNCs, dealt with large enterprise apps dealing with millions of customers.Your videos are helpful to an old timer like as well me who is able to compare the benefits and needs of these newer concepts. Keep up the good work !!

hamza-hyrv
Автор

Thanks a lot for making this topic simple and understandable. I have read many articles and watched videos, but nowhere I found an explanation as simple as this. 🙏

MegnaS-vgsy
Автор

I really enjoyed the playlist, the explanation was great and you made it so easy to understand. I have a course on udemy, but still I'm watching this playlist becuase of the content you provided for free.

TheEncouragementRoom
Автор

thanks for such a simple and detailed explanation

gauravpandey
Автор

Thanks, it's such an easy and simple explanation.

abhishek..bharti
Автор

@Composable
fun Counter() {
var count = remember { mutableStateOf(0) }
val key = count.value % 3 == 0
LaunchedEffect(key1 = key) {
Log.d(tag = "Counter", msg = "Current count: ${count.value}")
}
Button(onClick = { count.value++ }) {
Text(text = "Increment count")
}
}

Sir intially count ki value = 0 thi log.d mai print hogyi uske baad button click hua count ki value =1 hogyi statement false hogyi launched effect bi nhi chlega
Toh log.d mai count =1 kese aya or same jab 3 hui count ki value uske baad 4 hogi condition false hogi tab bi count 4 print hua

Dekh jaye toh
Count initial 0 tha log mai 0 aya
Uske baad button click hua count increment hua but post increment ha toh phle count ki value use hogi uske baad increment ho jyega toh count = 0 he gya second bar bi or vo true hogyi lekin print count = 1 hua ?

kunalchaudhary
Автор

but here how come 1 and 4 are getting printed? 4%3 ==0 toh false hai na?
then how it prints 4 similarly 1%3==0 is false still it printed 1?

Can u please explain this?

RahulAgrawal-st
Автор

Bhaiya, when will next video will come?

ChocoByte
Автор

Ek chz ki kammi ha. git code ni ha hmare pass. Too much time to implement.

TanveerAhmedLangah-hy
Автор

Meri ek problem hai kya app help Kar sakte hai

LifeStyle-htrv