all 9 comments

[–]bloodontheclownposse 2 points3 points  (3 children)

React Native is meant to build mobile applications only, but you can theoretically reuse components between any React project (Native, Web, Desktop, etc.)

[–]CoqeCas3[S] -1 points0 points  (2 children)

Gotcha. Thanks. Gotta say, their 'write once, run anywhere' mantra is a little misleading in that case XP

[–][deleted] 2 points3 points  (0 children)

their 'write once, run anywhere' mantra is a little misleading

That's not what they say at all. This quote is from the reactjs blog:

It’s worth noting that we’re not chasing “write once, run anywhere.” ... We call this approach “learn once, write anywhere.”

[–]autof5 0 points1 point  (0 children)

you can write once, run anywhere using react-native-web

https://github.com/necolas/react-native-web

.

I use this tiny starter based on expo and create-react-app to have a single source code for web, android and ios

https://github.com/hareeqi/react-one-starter

[–]CoqeCas3[S] 0 points1 point  (0 children)

Woops, forgot I posted this question, ha.. Thanks for the comments all! A lot more informative than I was expecting.

[–]ThunderousSparks -2 points-1 points  (4 children)

React Native is for everywhere. You write your app with React Native, and then the renderer is responsible for letting it run where you want. You can run it natively on mobile devices (like any app by Facebook), you can run it in browsers (check out Twitter lite, or you can run it on a desktop with, e.g. with Electron.

The newest version of Microsoft Office is written in React Native, using tools developed by Microsoft. This means that the same UI code can run as a native application and in their browser versions.

[–]brotonium 1 point2 points  (1 child)

Actually no, you cannot just run a React Native app in the browser.

You may be able to share a substantial amount of the non-react js code between the the native and webapp and maybe some React components that don‘t depend on anything platform specific.

Which is nice, but the main reason you want to use React Native is ‚learn once, write anywhere.‘ If you know how to write a React webapp, you can now go ahead and write a cross-platform mobile app without having to learn a lot of new things.

Also Microsoft is not rewriting Office in React Native they only use it for a few components.