Hacker News new | ask | show | jobs
by nathan_f77 3325 days ago
I've found something that could possibly be the unicorn: React Native. Facebook's official motto may be "learn once, write everywhere" but I don't care. I've found that it's completely possible to "write once, run everywhere", even if it's not officially supported.

I'm still a few weeks away from launching, but I'm writing a little game that I'm going to ship on iOS, Android, Windows Phone and desktop (UWP), and web (with react-native-web.) They all share 99% of the code, except for a few native modules.

I've had to do a ton of work to get all of this working, but I'm going to release all of my changes, open source libraries, and a boilerplate so that it's easy to get started.

After the initial release, I'm going to be adding support for Mac, Xbox One (UWP), Apple TV, and maybe Linux. Mac and Apple TV are both forks of iOS that share 90% of the native code. Xbox One almost works out of the box, and I just need to add gamepad support. Linux is the only platform that is missing - Canonical's Ubuntu fork has stalled and no-one seems to be working on it.

I'm also keeping an eye on Kotlin. I just found out that it might be possible to write cross-platform React Native modules using Kotlin. (I was planning to use C++ or Rust for some shared code.)