Hacker News new | ask | show | jobs
by petrbela 2605 days ago
"Learn once, write everywhere". Can't speak about performance comparison vs using Qt/.NET/whatever but the whole idea about React Native is that today, you can write a native app for iOS, tvOS, Android, web, macOS, Windows, and a few others, all using the same language and framework. You still have to understand platform specifics like UX guidelines but you use the same technology to build a fully customizable, and fully performant, native experience. It's sort of like using C++ but way more developer friendly.

The cons:

- an extra layer of abstraction

- need to write a plugin if you want to surface a native functionality to RN if it's not yet supported

- no visual UI editor like in native tools (Qt/VS), although you generally won't need it with React Native's code-first and instant refresh development workflow

- you need to be comfortable with React Native / JavaScript, obviously :-)

2 comments

It's not gonna run everywhere, for the same reason WPF doesn't run everywhere. Given that the apps written with this will bind to Windows using C++, and there is no abstraction in between (like Qt), it's not gonna be portable. As far as I understand, it is going to be a reimplementation of React Native where the apps might have a similar style, but the backend will be completely Windows specific. And nothing will stop a developer from using native Windows APIs, so they will.

> The "current" subdirectory adds support for an earlier React Native for Windows10 implemented from scratch in C#. It reimplemented the JS<->Native bridge in C#, and shared the JS with Facebook's implementation of React Native. The ongoing direction of React Native involves a closer interaction between C++ and JS which is hard to achieve with a separate C# implementation.

Given that they say that the "old" version "shared the JS" in past tense, that seems to hint that the "new" version will not share the JS? In that case, what is left of React? It sounds like it will be the same style of API and workflow, but different widgets and no cross-platform compatibility.

Source: https://github.com/Microsoft/react-native-windows/blob/maste...

He said "Learn once, write everywhere" not "Write once, run everywhere"
You can also write a native app for Android/iOS/tvOS/Windows/macOS/Linux and a few others, all using the same language and framework - C++ and Qt - see: https://doc.qt.io/qt-5/supported-platforms.html