Everything You Need to Know about derivedStateOf()

  Рет қаралды 5,469

Stevdza-San

Stevdza-San

Күн бұрын

🏆 My Online Courses
stevdza-san.com
☕ Buy me a Coffee
ko-fi.com/stev...
📝Medium
/ stevdza-san
💻 Github
github.com/ste...
📸 Instagram
/ stevdza_san
💎 Become a Premium Member
/ @stevdzasan
Watch the video and learn everything that you need to know about a side effect called derivedStateOf. Remove all confusions, but be sure to watch the whole video until the end. Ejoy and don't forget to leave a LIKE, it means a lot. :)

Пікірлер: 21
@jackli1924
@jackli1924 3 ай бұрын
You always explained tech so concise and through. Great job! Gratitude!
@AndrewDChristie
@AndrewDChristie 2 жыл бұрын
Thanks!
@David-zb8br
@David-zb8br 2 жыл бұрын
This channel is a gem for us android devs, never stop uploading
@StevdzaSan
@StevdzaSan 2 жыл бұрын
Thanks buddy! 💚
@muhammadirvan8655
@muhammadirvan8655 Жыл бұрын
Thanks for sharing Stevdza-San, this relearn for me much deeper and i remember using this for pagination list. It really helps to know when state is really changing if user scroll down to bottom of the screen. Keep it up!
@mieszkokozma4239
@mieszkokozma4239 2 жыл бұрын
No offence, but I think that this video could be done differently, so it actually explains when it's worth to use derivedStateOf and show some real world scenario of it being used. Basically you want to use derivedStateOf, once you want your composable to recompose LESS FREQUENTLY than the original state update. This might be the case for example when you're showing a value of Slider in a Text component. Slider updates are emitted very frequently and with high precision as a float, where you might want to only update Text once the value changed by at least 0,01. Then you could use derivedStateOf, round the state value into 2 decimals in its body and use such state in your Text. It'll recompose less frequently than the slider value updates.
@jaelsonwagner
@jaelsonwagner 10 ай бұрын
Nice sample suggestion.
@baharudinmaulana78
@baharudinmaulana78 2 жыл бұрын
Amazing, ibhope you always well, your content is very inspiring for me,
@salvadorjohndeniel
@salvadorjohndeniel 2 жыл бұрын
Thank you for this.
@pankajthapa8957
@pankajthapa8957 2 жыл бұрын
Good explanation on uses of derviedStateOf() keep it up
@StevdzaSan
@StevdzaSan 2 жыл бұрын
Thanks 👍
@dev_jeongdaeri
@dev_jeongdaeri 2 жыл бұрын
Super cool
@chirantanchaudhury2809
@chirantanchaudhury2809 2 жыл бұрын
Very helpful 👍🏻
@VictorFarkas-fp2gl
@VictorFarkas-fp2gl 2 жыл бұрын
Nice one 👍
@StevdzaSan
@StevdzaSan 2 жыл бұрын
Thanks ✌️
@entrealist
@entrealist 2 жыл бұрын
I did understand nothing to be honest. It so easy to get confused by just using "by remember" and "= remember".. why mutableState is not derived by default?
@im_swapnil_musale
@im_swapnil_musale 2 жыл бұрын
Hey maybe I'm wrong but previously log was getting printed because of isn't in the remember body And later on you have added calculated log inside remember that's why it's not getting changed
@StevdzaSan
@StevdzaSan 2 жыл бұрын
You gotta explain that a bit more, since I don't know on what exactly are you referring to in the code, there were a lot of logs.
@mehulbisht9708
@mehulbisht9708 2 жыл бұрын
@@StevdzaSan he basically means that, in the starting of the video you just had the `count` variable's state inside the `remember` block and the log statement with `LOG READ` tag was outside it, but there were not any log statements in that same `remember` block. But his point isn't valid here, as it has nothing to do with the log statement being inside or outside the remember block, since that log statement which has the `LOG calculated` tag only gets printed when the `calculation` variable is assigned a new value, which in turn depends on the `count > 3` condition to have changed atleast once :)
@xabutencolorado1587
@xabutencolorado1587 2 жыл бұрын
This doesn't work out the way I expect
@Briogus
@Briogus 2 жыл бұрын
This wont work buddy. I wasted my time,
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН
derivedStateOf VS. remember(key) - THIS is Really the Difference 🤯
14:46
Should You Use Compose State or StateFlow in Your ViewModels?
13:59
Philipp Lackner
Рет қаралды 86 М.
Performance Optimization with @Stable and @Immutable in Jetpack Compose
16:47
Let's do some Testing - Jetpack Compose
21:34
Stevdza-San
Рет қаралды 7 М.
Dependency Injection, The Best Pattern
13:16
CodeAesthetic
Рет қаралды 920 М.
I Spent 100 Hours Inside The Pyramids!
21:43
MrBeast
Рет қаралды 36 МЛН
You're Collecting Your Flows Wrong In Compose | THIS Is Why
11:35
Philipp Lackner
Рет қаралды 32 М.
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН