Hello I am new to build apps with Kotlij JS
I want to have a suggestion for which framework to use for UI
• Kotlin - react
• Compose for web
PS: we are going to use jetpack compose for Android and potentially Desktop
But want opinions here
n
nordiauwu
09/30/2021, 4:17 AM
React is much more mature and has a lot of great libraries built around it (e.g. react-query), so I'd go with it for now.
n
Nikola Milovic
09/30/2021, 1:10 PM
Yeah React is a pretty pleasant experience so far
j
Jilles van Gurp
10/01/2021, 10:07 AM
Fritz2 is what we use currently. We are pretty happy with it. It's a nice modern, reactive kotlin framework. Compose web might be the future but it may be a bit early to jump on right now. I have no experience with it though. Fritz2 is also a bit cutting edge but we've found it to be stable and easy to deal with. And their state management is basically using StateFlow's so that is very nice to deal with. Also, love their component library and styling & theming.
React is OK but it will basically cause you to have to deal with a lot of js interoperability issues, api/idiom mismatch, etc. IMHO react users are better off sticking to typescript. Just involves less problem solving and you are using a well supported thing and you are not constantly fighting the fact that it really wants to be a javascript framework rather than a proper Kotlin framework. If you use kotlin-js, the whole point is getting away from that ecosystem.
Another framework that should be mentioned is kvision. I have little experience with it but it seems like a pretty comprehensive option.
Jilles van Gurp
10/01/2021, 10:10 AM
Fritz2 is probably similarish to compose and modern android development. So, worth a look. But would recommend taking a serious look at compose web as well as that obviously more closely aligns with what you are doing on Android. This wasn't really an option for us yet late last year, when we made the bet on Fritz2.
n
Nikola Milovic
10/02/2021, 7:19 AM
@Jilles van Gurp With react and kotlin you get added bonus of types and writing kotlin code. NPM libraries interop is pretty straightforward most of the time and react ecosystem is the largest for web dev. I am using Kotlin Multiplatform and now have option to go for any platform I want as 95% of the business logic is contained in the common code and React is just used for the UI with the benefit of thousand of libraries, css frameworks like Tailwind, Chakra and so on. It's a pretty decent option and currently pretty supported officially by jetbrains. Your points definitely stand, just wanted to make sure to point out that React definitely is an option, you don't have to stick with typescript
r
Rohan Maity
10/02/2021, 7:39 AM
Ok thank you guys for these suggestions
It seems compose still usable only for test projects probably