hi, is it possible with KMP to have a Kotlin backe...
# multiplatform
g
hi, is it possible with KMP to have a Kotlin backend and a React frontend? I want to target Desktop (Linux, Windows and Max, maybe also Android). I do not really want to use another language then TypeScript in the Frontend. Is that possible with KMP? Thanks
👌 1
p
That's how they do at Shopify
g
Is there a guide on how to do this or will the wizard ask if I want to use TypeScript and React in the frontend? For example with Tauri I would just select that I want to use Vite, React and TypeScript in the Frontend. Is this the same with KMP or so I have to dig into and spend many hours to get such a setup running?
p
Most likely there's something in GitHub. Basically any KMP project that target JS can serve as template. You will code the JS stuff in the jsMain target and the KMP stuff in commonMain
Perhaps asking here will help #C0B8L3U69
g
ok, but in general this seems to be not a common use case right (how people would use KMP)?
p
In terms of CLEAN architecture, React native for pure UI, presentation. Let's say whatever happens after the ViewModel. KMP for the rest, ViewModel, domain, data layers.
👍 1
c
Alternatively, You could, theoretically, export your KMP project as a third-party library, then import that into your React Native project. But I don't know if this would work. Disclaimer: I've never tried this. Personally, I have tried to avoid React Native like the plague.
✔️ 1