Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Compose Multiplatform render UI on iOS?

I know that Flutter renders the UI on a native canvas completely controlled by the Flutter run time. In React Native, it translates to the native UI via a bridge and renders native components.

How does Compose Multiplatform render the UI on iOS? Does it translate to the native UI (SwiftUI) or does it still use a canvas that's completely controlled by the Compose runtime and draw directly on it?

like image 743
Vishnu Haridas Avatar asked Sep 05 '26 21:09

Vishnu Haridas


1 Answers

Compose Multiplatform uses the canvas and draws directly to the screen. That is obviously similar to Flutter.

So, why not Flutter?

  • Android UI is fully "native" as far as Compose being the recommended UI system to use. You'd likely write you UI with Compose anyway.
  • You can blend Compose UI views and SwiftUI in the same app, and the same screen, and share your underlying "view model" code. Screens written in Compose UI on iOS can be incrementally "refaced" with SwiftUI.

It is also possible to drive SwiftUI with a shared Compose DSL. We have done some experiments with this. However, that would take significant work to develop a usable common Compose DSL.

like image 198
Kevin Galligan Avatar answered Sep 11 '26 11:09

Kevin Galligan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!