اولا يعني اي compose

هي Jetpack Compose هو الـ modern UI toolkit في Android، بنبني بيه واجهة التطبيق باستخدام Kotlin code وComposable functions بدل ما نبنيها بملفات XML.

Compose vs XML

XML Jetpack Compose
UI is written in XML UI is written in Kotlin
Imperative Declarative
We use Views such as TextView, Button use Text(), Button()
We need findViewById or ViewBinding to handle the views. There is no traditional ViewBinding
Changing the UI is usually done manually. The UI updates automatically as the state changes.
State management أصعب نسبيًا State وrecomposition جزء أساسي من Compose
XML + Kotlin Kotlin is only for UI

180) اي هي Recomposition في Jetpack Compose؟

الإجابة : الـ Recomposition يعني إعادة تنفيذ جزء من الـ Composables لما الـ State اللي بيقرأ منها تتغير.


181) امتى تحدث Recomposition؟

الإجابة : بتحصل لما:


182) إزاي أمنع الـ Unnecessary Recompositions؟

الإجابة :