7 ms·
You can do isomorphic (server-side and client-side) rendering in Kotlin. For mobile UI, you can build native UIs in Kotlin for Android and for iOS, but the UI c
by yole 9y ago
You can do isomorphic (server-side and client-side) rendering in Kotlin. For mobile UI, you can build native UIs in Kotlin for Android and for iOS, but the UI code will be different for each platform, built on the native API of the corresponding platform. At this time we have no plans to build a solution for reusing UI code between mobile platforms.
- continuations 9y agoIf I can't reuse code between iOS & Android then what is the benefit of using Kotlin over just building mobile apps in Java & Swift?
- yole 9y agoYou can't reuse UI code between iOS and Android. You do have the ability to reuse the business logic code (domain models and so on).
- maxdo 9y agoGreat idea , but for many react apps (both native and JS) domain models doesn’t exists. Redux + graphql apps let me eliminate even more logic. So what we actually share between react native and react JS apps are : graphql queries, reducers, saga middleware. The rest is just UI. In my usecases there is nothing to share using Kotlin.
- s73ver_ 9y agoThey said UI code. You shouldn't be reusing that anyway. You should be writing stuff to take advantage of the native platform.
- Benjammer 9y agoIMO, It's just a different approach to the idea than the React world. I would assume the idea here is that you always want to write your UI layer "natively" in order to take full advantage of platform-specific performance accelerations/hardware APIs, but the entire stack underneath what's actually rendering visual components would be shared. It forces you to start out more modular between your UI code and domain logic code, whereas React (& React Native) leaves the door open right at the start for tight coupling between UI code & domain logic, unless you expressly build this separation into your initial architecture.