I’d would like to share another interesting finding for KMP.
I started to dig into
Kotlin/React
, and I realized it’s really simple to make components, using
Kotlin-DSL
HTML elements. I have started to create Web component functions that have exactly the same API of JetpackCompose composables (e.g. NavigationBar, NavigationItem).
So, I can now build a webApp with Jetpack composables, still using Kotlin! It’s really awesome.
I believe someone (maybe JetBrains itself) will eventually extend JetpackCompose to web, because it makes a lot of sense.
I can see in the near future we will just have 2 UI frameworks:
JetpackCompose
(for Android, Desktop and Web) and
SwiftUI
(for iPhone, iPad, Mac, etc.).
I don’t even think React will last, because JetBrains already gained so much expertise that they can easily write their own efficient web reactive framework in Kotlin/JS, based on
StateFlow
using JetpackCompose components for the UI, bypassing React completely.
So, my suggestion for everyone is to really start learning JetpackCompose and SwiftUI, because this is going to be the base for any app of the future. All the rest will become legacy.