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

  Рет қаралды 12,364

Cheezy Code

Cheezy Code

Жыл бұрын

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 -
• Kotlin Flows Tutorials
Jetpack Paging Tutorial -
• Android Paging 3 | Jet...
Complete Dependency Injection Playlist Link -
• Dagger 2 - Dependency ...
Complete Android Architecture Components Playlist -
• Android Architecture C...
Beginner series in Android Playlist (Hindi) -
• Android Tutorials Step...
Kotlin Beginners Tutorial Series -
• Kotlin Beginner Tutori...
For more info - visit the below link
www.cheezycode.com
We are social. Follow us at -
Facebook - / cheezycode
Twitter - / cheezycode
Instagram - / cheezycode

Пікірлер: 26
@hamza-hy5rv
@hamza-hy5rv 3 ай бұрын
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 !!
@sinbad552
@sinbad552 3 ай бұрын
can we connect please?
@hamza-hy5rv
@hamza-hy5rv 3 ай бұрын
@@sinbad552 Sure.This is regarding ?
@abhishek..bharti
@abhishek..bharti 4 ай бұрын
Thanks, it's such an easy and simple explanation.
@TheEncouragementRoom
@TheEncouragementRoom 4 ай бұрын
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.
@MegnaS-vg9sy
@MegnaS-vg9sy 8 ай бұрын
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. 🙏
@samirgawas
@samirgawas Жыл бұрын
You made it simple! thanks🙏
@udaysharma5228
@udaysharma5228 Жыл бұрын
Easy and to the point!
@PrashantSingh-d97
@PrashantSingh-d97 Жыл бұрын
It was so simple to understand 😊
@iampradeephr
@iampradeephr Жыл бұрын
Beautiful explanation... 🔥
@SumitStar24
@SumitStar24 Жыл бұрын
Very good explanation.. 👍👍👍
@curiousguy30
@curiousguy30 9 ай бұрын
explained very well.
@rishikeshsingh9946
@rishikeshsingh9946 Жыл бұрын
❤❤❤❤❤ awesome
@ravikantgupta4074
@ravikantgupta4074 3 ай бұрын
well explained.
@khanra17
@khanra17 Жыл бұрын
As always 🎉
@CheezyCode
@CheezyCode Жыл бұрын
Thank you ❣️
@kunalchaudhary6165
@kunalchaudhary6165 2 ай бұрын
@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 ?
@LifeStyle-ht1rv
@LifeStyle-ht1rv Жыл бұрын
Hello bhai
@user-yr9cn3db7m
@user-yr9cn3db7m 10 ай бұрын
Ek chz ki kammi ha. git code ni ha hmare pass. Too much time to implement.
@ChocoByte
@ChocoByte Жыл бұрын
Bhaiya, when will next video will come?
@CheezyCode
@CheezyCode Жыл бұрын
done
@ChocoByte
@ChocoByte Жыл бұрын
@@CheezyCode Lub you bruh💌
@user-cw1xw7by7f
@user-cw1xw7by7f 4 ай бұрын
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?
@FaadCode
@FaadCode 4 ай бұрын
Bhai AAP smje nhi yaha pr key value change hone se laucheffect work karta h . Why it work : 3%3 ==0 mean true 4%3== 0 mean false To yaha pr key value change Hui na ?? Isliye isne work Kiya . Smje ??
@LifeStyle-ht1rv
@LifeStyle-ht1rv Жыл бұрын
Meri ek problem hai kya app help Kar sakte hai
@LifeStyle-ht1rv
@LifeStyle-ht1rv Жыл бұрын
App se related
Inside Out 2: Who is the strongest? Joy vs Envy vs Anger #shorts #animation
00:22
Это реально работает?!
00:33
БРУНО
Рет қаралды 2,4 МЛН
Heartwarming Unity at School Event #shorts
00:19
Fabiosa Stories
Рет қаралды 25 МЛН
Advanced state and side effects in Jetpack Compose
41:21
Android Developers
Рет қаралды 34 М.
Should You Use Compose State or StateFlow in Your ViewModels?
13:59
Philipp Lackner
Рет қаралды 74 М.
Full Guide to Jetpack Compose Effect Handlers
24:56
Philipp Lackner
Рет қаралды 90 М.
Launched Effect EXPLAINED - Mastering Side Effects 😁!
8:23
Charfaoui Younes
Рет қаралды 6 М.
Gestures in Jetpack Compose
31:33
Android Developers
Рет қаралды 22 М.
Why The Windows Phone Failed
24:08
Apple Explained
Рет қаралды 238 М.
Inside Out 2: Who is the strongest? Joy vs Envy vs Anger #shorts #animation
00:22