Jetpack Compose: everything you need to know to get started
Introduction
Jetpack Compose is the new guy on the block that everybody is swooning over! With its breakthrough approach in Android UI designing, uber-cool syntax and the fact that it brings Android development closer to web-designing(React) and iOS development(Swift UI), it is gaining popularity by the hour. For a while there, I had my apprehensions about it and didn’t quite get the problem that Compose tried to solve. However, once I dipped my toes into it, I could indeed see the inherent issues that the Android world had always been clouded with and how Compose blows them away, opening up a world of possibilities and optimisations!
What is Jetpack Compose?
As per www.developer.google.com , Jetpack Compose is “Android’s modern toolkit for building native UI. It simplifies and accelerates. Compose makes it easier to write and maintain your app UI by providing a declarative API that allows you to render your app UI without imperatively mutating frontend views.”
But what does that even mean? Let’s break down the definition and understand its elements:
What is Declarative UI and how is it different from imperative UI?
Imperative UI involves having a separate prototype/model of the application’s UI. This design focuses on the how
rather than the what
. An example is XML layouts in Android. We design the widgets and…