How to start with Ktor + React?

How to start with Ktor + React?

I’m bootstrapping a webapp project and I’m evaluating the possibility to use Ktor for the backend, mainly because it’s lightweight and very fast compared to Spring Boot and I like the idea of exploiting the multiplatform features in the future.

However I’m finding it extremely hard to find a proper way to use Reactjs with Ktor.

If I go the multiplatform route, I found this project that I believe is the most up to date one to use as a starting point: https://play.kotlinlang.org/hands-on/Full%20Stack%20Web%20App%20with%20Kotlin%20Multiplatform/01_Introduction (there’s also this one https://github.com/Kotlin/kotlin-full-stack-application-demo but it seems a bit more outdated). However I see a major problem, namely that I would not be able to use any UI library such as React Material UI or React Bootstrap with it because they have not been adapted to kotlin yet. Which is a major show stopper because:

  • at the moment I’m going to work on the project alone and I need ready to use components to speed up the implementation
  • I don’t want to invest hours in trying to adapt the UI library of choice to kotlin on my own and then waste time running after obscure bugs

Since it seems that the full stack option is still in its infancy I’m also trying to figure out if I could go the Ktor + typescript Reactjs route. But I could not find any information about it or any example on how to bundle everything together using gradle. I believe this is partly due to the fact that JetBrains is pushing the full kotlin route and discouraging mixed solutions so I’m turning to you to get some pointers.

Any suggestions? Or is it better to stick to Spring Boot for now?

EDIT: Quarkus might be a good alternative as well

submitted by /u/astro1066
[link] [comments]