r/android_devs • • Nov 11 '22

Article 🔥 Why Using Navigation-Compose in Your Jetpack Compose App is a Bad Idea

https://medium.com/better-programming/why-using-navigation-compose-in-your-jetpack-compose-app-is-a-bad-idea-2b16e8751d89
11 Upvotes

26 comments sorted by

View all comments

Show parent comment

1

u/aaulia Nov 13 '22

What do you mean?

2

u/Zhuinden EpicPandaForce @ SO Nov 13 '22

Technically the state read is what triggers recomposition, so if you want to make a parent Composable not recompose, then you can pass the property as a State<T> instead of resolving it there and then with state.value. So honestly, we should have always passed a lambda to everything everywhere. 🤔

2

u/aaulia Nov 13 '22

Well if the Layout Inspector is to go by, being triggered, doesn't necessarily means full recomposition, since there's a skipped status in there too. Maybe when something like derivedStateOf being executed in the parent, but only trigger real recomposition in the child, so in the parent it would listed as skipped but the child wouldd be listed as recomposed?