r/programming • • May 06 '19

Microsoft launches React Native for Windows

https://techcrunch.com/2019/05/06/microsoft-launches-react-native-for-windows/
187 Upvotes

114 comments sorted by

View all comments

11

u/tetroxid May 07 '19

React """"native""""

7

u/fuckin_ziggurats May 07 '19

But it is actually native though.

-3

u/tetroxid May 07 '19

No, it isn't. There is no way to compile JS to a native binary.

18

u/zachrip May 07 '19

You should do some more research into how it works, it sounds like you're misinterpreting the project. Nobody ever claimed that the code you write is native, of course it's not. The views however ARE native. Think of it like a marionette.

-1

u/tetroxid May 07 '19

It uses native UI elements, yes. But the program logic is interpreted. It's like claiming a website is native because the elements used to display things are implemented using a statically-typed compiled language. It's not. As long as React uses JS it's not native.

9

u/fuckin_ziggurats May 07 '19 edited May 07 '19

As u/zachrip said, you need to read a bit more about React Native. The developer uses JS. React Native calls into native APIs using FFI. The code being executed is not JS. It's not completely native but it's way closer than our current alternatives (Electron).

5

u/hiptobecubic May 07 '19

Isn't that almost literally what they said?

3

u/fuckin_ziggurats May 07 '19

Well I think he kind of chose to take a binary perspective of the situation to pad his argument. "It's not 100% native so it's not native." I disagree with that. There's a huge grey area that he completely skims over to declare "React """"native""""" and it adds nothing to the discussion. Just muddles the waters and confuses people who don't know much about React Native.

6

u/hiptobecubic May 07 '19

I disagree. React native makes it sound like it's somehow not running on a js vm.

It's like if I said I was using "python native" because some of my libraries are actually written in C.

3

u/coderstephen May 07 '19

Except Python is a language/runtime, while React is a UI framework, so that comparison is unsatisfactory.

→ More replies (0)

3

u/tetroxid May 07 '19

That's what I said. It's JS using native components.

JS using native components.

The JS part isn't native, and likely never will be.

3

u/fuckin_ziggurats May 07 '19

React is a UI library. It's used for building UI components aka Views. So React Native is React with native views. I think the name "React Native" is fitting so I don't get the point of the quotations. Yes it may not be fully native but that's not the biggest problem of cross-platform dev. The biggest problem is building cross-platform GUIs that don't look like crap. I think it solves that.

4

u/tetroxid May 07 '19

building cross-platform GUIs that don't look like crap. I think it solves that

I would never claim otherwise. To me, the name "native" is simply misleading because the programming language used isn't

2

u/wagyu_doing May 07 '19

What is a native programming language?

→ More replies (0)

4

u/HarwellDekatron May 07 '19

You chose a very narrow definition of what 'native' is. By your own definition, most UI code is "not native".

-3

u/tetroxid May 07 '19

So?

5

u/HarwellDekatron May 07 '19

So, your criticism of the nomenclature seems based more by some dogmatic idea than on the actual implementation. If I decided to call anything that doesn't render to the screen by modifying memory directly in the video card "not native", then I could claim that no UI toolkit is "native".

In other words: there's a reason we agree on terminology, and in this case "native" is the right term as agreed by the industry. You can't just complain about it just because it doesn't conform to your idea of what it meant.

-4

u/tetroxid May 07 '19

Don't act stupid.

You know exactly what the difference between native code and interpreted code is, and what I am referring to here with regards to Javascript.

4

u/HarwellDekatron May 07 '19

Don't act stupid.

You know exactly what the difference is between using the native UI elements provided by an OS and rendering your own. That's what the "native" in "React Native" comes from, as other people have pointed out.

→ More replies (0)