https://kotlinlang.org logo
#javascript
Title
# javascript
g

Goetz Markgraf

06/27/2023, 4:06 PM
👋 I have learned how to write an SPA with React in kotlin. I would like to know if it is possible, to use Kotlin/JS for other use cases, for example using NextJS or Remix with kotlin/JS? I simply don’t like JavaScript (TypeScript is slightly better) and would love to write these kinds of applications in kotlin, too. thank you color
s

spierce7

06/27/2023, 4:24 PM
NextJS, because of the way their router works, it's difficult to do from kotlin. They like separate files. You could have a single dynamic router, and then just create everything you want with Kotlin. That would work. It's not an approach I'd recommend though for a normal website.
b

Big Chungus

06/27/2023, 4:25 PM
Might be possible now that eap builds support es modules and per-file transpiration
s

spierce7

06/27/2023, 4:27 PM
@Big Chungus wait what? Can you talk more about this per file transpiration?
Per-file transpilation requires 1.9.20-Beta ES6 requires 1.9.0-Beta
Looks like es6 modules are in 1.8.20 as experimental feature afterall.
s

spierce7

06/27/2023, 9:09 PM
oh, I see
3 Views