by iamcalledrob · 3y ago · 0 comments
For anyone that's enjoying the idea of SwiftUI (but not the reality), Jetpack Compose on Android might be up your alley.
It doesn't try and wrap legacy views-the framework renders every pixel itself.
This allows you to get the rapid build speed of declarative UI but also an extremely high level of polish.
As a bonus, the core components are open source, so you can see how a Button or CircularProgressIndicator works (for example)
Compose uses normal functions that render themselves and return nothing (rather than returning a crazy complex typed view like SwiftUI does-often breaking the compiler). And "remember {}" blocks for state feels so much simpler than every view being a struct with @State.
In a funny way this functions-not-objects approach is the most surprising design choice made by Compose considering the Java/Kotlin ecosystem it exists within.
And you’re right, SwiftUI “onboarding” is almost deceitfully simple/natural. And, in general, there being no friction in its UX makes it so easy to gradually build up issues in complete ignorance. And when it does become apparent, you’re working with a gorilla, i.e. steps to rectify are expensive.
I look forward to trying out Compose for all the reasons stated. Thanks for sharing !