Live data from Hacker News

Create React apps using Kotlin

github.com

21–30 of 68 posts

Re: Create React apps using Kotlin

#22

Does this mean that Kotlin -> React -> React Native is feasible too? It's a bit ridiculous on its face, but is there a better way to run Kotlin on iOS? Kotlin is a godsend for Android but if you have to support both platforms one codebase is better

Yes, it's called Kotlin Native: https://github.com/JetBrains/kotlin-native

Kotlin right now is a serious competitor for a full stack, any device language. An alternative may be F# which has Fable for Browser, Xamarin (mobile) and .net core for server. But Kotlin looks more integrated to me.

Coming from a C#/F# background, Kotlin is really a joy to use.

Re: Create React apps using Kotlin

#24

Does this mean that Kotlin -> React -> React Native is feasible too? It's a bit ridiculous on its face, but is there a better way to run Kotlin on iOS? Kotlin is a godsend for Android but if you have to support both platforms one codebase is better

It's not production ready yet, but Kotlin Native is probably the way to go for iOS support.

https://github.com/JetBrains/kotlin-native

Re: Create React apps using Kotlin

#25
post #7

Can I use this outside IntelliJ (Atom perhaps)? I despise JavaScript, GWT is underwhelming and Kotlin seems like a nice way to bypass these issues + React is becoming a de-facto standard. IntelliJ became too big/slow/feature creeped and I am not having good time with the latest code completion changes, so I am considering dropping it (PyCharm as well) for something more light-weight.

You definitely can. The only major requirement is Java being installed on your machine. This project installs Kotlin compiler and runtime as npm dependencies

Re: Create React apps using Kotlin

#26
post #18
post #12

Earlier quoted context omitted.

Well, I did comment once on the Koltin Jetbrains forum, about how hard they make to download ... just kotlin ... outside of the jetbrains ide and their response, on their forum, was that they are intentionally make hard to avoid the jetbrains ide while using kotlin now technically you still can, kotlin is open source, and you can download it standalone, if you search hard enough i am not really sure, how jetbrains th…

> and their response, on their forum, was that they are intentionally make hard to avoid the jetbrains ide while using kotlin do you have a link for this?

https://discuss.kotlinlang.org/t/downloading-the-stand-alone...

Re: Create React apps using Kotlin

#27
How is the debugging experience? Is there a debugging experience?

I'm currently a typescript user and I like what VS code has going on with attaching to chrome and providing debugging within the ide. Source maps are okay but a seamless experience in the source language is better. Does the kotlin IDE have facilities for debugging what is going on in the browser?

Re: Create React apps using Kotlin

#28
post #26
post #18

Earlier quoted context omitted.

> and their response, on their forum, was that they are intentionally make hard to avoid the jetbrains ide while using kotlin do you have a link for this?

https://discuss.kotlinlang.org/t/downloading-the-stand-alone...

It's good you supplied the link, as you've misrepresented its contents somewhat. What they are discouraging downloads of is the standalone compiler, because if you want to compile outside of an IDE, gradle is the better choice.

As alternatives they suggest their online REPL (to play and learn without installing anything), IntelliJ (unsurprisingly their favourite), gradle, or maven. The latter are about as fully-fledged build systems as you can imagine and are easily used with any editor.

I'm sure there will be gradle plug-ins available for VS.Code or Atom, or a gradle mode for emacs.

Re: Create React apps using Kotlin

#29

Does this mean that Kotlin -> React -> React Native is feasible too? It's a bit ridiculous on its face, but is there a better way to run Kotlin on iOS? Kotlin is a godsend for Android but if you have to support both platforms one codebase is better

Kotlin Native is what you are looking for.

Or maybe j2Objc

One codebase for both platforms is not necessarily what you want though.

Let me rephrase, it might be what you want for a pretty small app : if you have to create an app for a restaurant with orders and menu, a cross platform solution is probably the best use of your time.

For anything bigger, it becomes a harder sell. All these solutions tend to have the same downsides :

- limited access to new platform features. Especially damaging when Apple tells you that you are going to get featured if you do a Watch app but your SDK does not support that yet.

- one design does not scale well to two platforms with different UX and features.

- one more layer of abstraction to manage; making maintainability harder

I think that there is clearly a space for a cross platform business logic framework though. It tends to be the same on both platform with minor differences. It is a pity that only j2objc seems to clearly target this. k2objc/swift would be awesome.

Re: Create React apps using Kotlin

#30
I was trying to get this setup going the other day and found it a little fiddly with some of the Jetbrain’s documentation on Kotlin->JS being outdated it seemed and the sample application they have supplied having some issues with missing dependencies, specifically missing package versions on NPM. I’ll be trying this out straightaway, so many thanks for this!
Post reply on HN