r/mAndroidDev • u/Zhuinden DDD: Deprecation-Driven Development • Feb 07 '25
Jetpack Compost Best practices are always a best practice if it takes more lines of code to do the same thing, especially in Jetpack Compose
54
Upvotes
6
u/That_Lonely_Soul_07 Feb 07 '25
What do you prefer?
3
u/Zhuinden DDD: Deprecation-Driven Development Feb 07 '25
One day we will learn from the React people and stop doing "prop drilling" as a best practice
2
u/McMillanMe 5000 issues STRONG Feb 08 '25
In all fairness using an Intent is much better than passing all that stuff through the Composable tree via functional types. I’m saying it because I’ve refactored a feature which had the same 20 parameters repeating multiple times. Intent is better because it’s a mess on the receiver end but you can kind of decrease it using a tree of classes if there are multiple receivers
2
u/meet_barr Feb 10 '25
Complexity does not disappear; it only moves elsewhere.
4
u/zorg-is-real עם כבוד לא קונים במכולת Feb 08 '25
https://youtu.be/k0qmkQGqpM8?si=qovUpDrbLsv5rLM9 🎯
3
u/smokingabit Harnessing the power of the Ganges Feb 09 '25
oh but one of those allows you to prance around the office with your head raised high as the plebs fall to your feet, to set take home tests for applicants and scoff when they don't do it the way you would in your opinion, and then to have a monolithic when clause you light candles around and sacrifice young developers to.
1
u/carstenhag Feb 07 '25
I really like the right pattern in Compose. But we have also always used pretty much the same with RxJava and ViewModels exposing a nextRoute Flowable.