Full Guide to Jetpack Compose Effect Handlers

preview_player
Показать описание
The new effect handlers in Jetpack Compose can be quite a pain to deal with if you don't fully understand their purpose. However, they're super important to write performant Jetpack Compose code without side-effects.
This video once and for all goes through all these effect handlers, so you'll know what it's about afterwards.

⭐ Get certificates for your future job
⭐ Save countless hours of time
⭐ 100% money back guarantee for 30 days
⭐ Become a professional Android developer now:

💻 Let me personally review your code and provide individual feedback, so it won't backfire and cost you a fortune in future:

🎓 Become an industry-ready developer in the Mobile Dev Campus:

🎁 Get my FREE 4.5h course "The Best Practice Guide to Android Architecture":

Read our weekly Android blog:

Join this channel to get access to perks:

Regular live codings on Twitch:

Join my Discord server:

You like my free content? Here you can buy me a coffee:

00:00 - What is a side-effect?
03:34 - LaunchedEffect
09:11 - rememberCoroutineScope
11:08 - rememberUpdatedState
13:03 - DisposableEffect
15:53 - SideEffect
17:20 - produceState
19:12 - derivedStateOf
22:51 - snapshotFlow
Рекомендации по теме
Комментарии
Автор

For me you are the best channel for Android development

thegreatwarrior
Автор

Philipp is forever invited to my home for dinner. Such nice content and delivery.

re
Автор

I always check on my notifications to make sure i did not miss a new video from this guy

allanandliftedhands
Автор

Thanks for this! Although my mind couldn't absorb any of the discussed effect. Part 1 to 9 is clear and easy to follow as a newbie of Jetpack Compose. This part (Part 10) doesn't have any relevance in almost all discussed subjects in parts 1 to 9 that's why I couldn't comprehend. Maybe this should be moved in a more advanced playlist for compose. I will just skip to the next part hopefully I am not totally lost as I really love the tutorials. I'll take note on this effect handlers and when I got to the point when I already need this subject then I'll just get back here. Thanks Philipp! Cheers!

OnlineEntrepreneurTools
Автор

Thank you Philipp, You explain contents with interesting examples.
Here is one of the best channel for android.
👏👏

alihosseinnezhad
Автор

THANK YOU SO MUCH, just this afternoon i was duct taping together my own event system from snippets of code i found online, but the one you show in LaunchedEffect part is so much better and cleaner! Thanks! The rest of the video is also great as well!

kepper
Автор

You are the few youtube channels that I have turned on notifications on :D You touch on very important points as always. Thanks.

MetehanBOLAT
Автор

Thanks Philipp 🥰, You are the best teacher 🙏

hadjsaidaoumer
Автор

Just be careful, think of derivedStateOf just as you would mutableStateOf in a sense that it needs to be remembered! Otherwise this isn't remembered and in case of recomposition will just be called again from scratch. And overall it feels like your explanation on derivedStateOf could be improved a bit. You didn't mention anything about how it implicitly "subscribes" to the state objects that are being accessed in there, but doesn't have any mechanism to update itself when non-state objects are being read in its lambda are changed so it would then show stale data.
I really suggest people to read the excellent documentation on these, it does a great job explaining with examples how they work.

GakisStylianos
Автор

The only 2 I found useful were LaunchedEffect and DisposableEffect. The rest of them were created to make the interviews harder.

alindo
Автор

I was struggling with this. Thanks for the video ❤️❤️

vedx
Автор

Thanks for the video. I appreciated all the examples and the simplicity of them for easier understandability.

danielkeyes
Автор

Gem's channel, thanx man, wish you all the best in your life <3

techmarinar
Автор

awesome video! just one simple thing I notest was he snapshotFlow using the distincUntilChanged(), actually the snapshotFlow itself is already handling it, so it will get the latest value of the state if its value is different, so in this case you dont need call the distinctUntilChanged. btw thanks a lot for this video it helped a lot to understand all of them <3

themisterravenous
Автор

Seriously I was waiting for this video
Thanks 😊

AhsanAli-vzmg
Автор

Months later, my webview was playing audio event after navigating away. Destroying it in DisposableEffect did the trick.
Good thing I bookmarked this video 😁

original_anu
Автор

On 7:02 you said that code in LaunchedEffect only once when screen composed for the first time. How another Event can happen in this case? E.g. it collects first event - ShowSnackbar and then Navigate event happens but you told that code executed only once

azatnabiullin
Автор

at 3:00 you said its a terrible practise to directly call api inside composable. Can you please tell what is the best practise ?

akshaytyagi
Автор

I’m trying to run a recursive task every 15seconds (like call an api) on my jetpack screen, how can I achieve this with launched effect or any other Android class without using workmanager.

ifedayoadekoya
Автор

what's the hotkey that you use at 15:28 to move the line up, through a brace, into onDispose scope?

sbudekc