Hey everyone, my company is in the process of tryi...
# javascript
j
Hey everyone, my company is in the process of trying out Kotlin to have a shared data layer between the different frontends (android, iOS, web). The main development effort will happen on iOS first, but I am wanna try to get something running on web as early as possible in parallel. Is now the right time to try to do so? Or should one wait for the next (some future) release, which is gonna make everything much easier?
t
Web = web app or web library?
Do you have plans to use ktor or coroutines in Kotlin/JS?
j
Web library which our existing (react/ts) web app would call Not sure about ktor or coroutines.
b
If you're sharing just domain models, then there's very little overhead to make it available to the web now (since dukat is now able to spit out ts declarations) should be as simple as declaring js browser lib target in your gradlefile
a
If you intend to use ktor client or coroutines, you should expect a large bundle size. It gets even worse when you throw serialization in
b
I'd suggest limiting MPP usage for your data classes only and then expand on it when you have a clearer vision on your project's requirements
t
you should expect a large bundle size. It gets even worse when you throw serialization in
Please vote for ES6 & Root export if you need small bundles too 🙂
c
if you start now you could use the 1.4 milestones and the new IR javascript compiler
t
IR = more problems right now
1.3.72
- good for start