Live data from Hacker News

React Native for Windows and Mac

microsoft.github.io

61–70 of 505 posts

Re: React Native for Windows and Mac

#61
post #6

I'd love to abandon my C/C++ UI frameworks for React, but I need - consistent rendering/support across multiple platforms and versions - multiple windows - rendering to a window that isn't owned by the UI being rendered or created by the framework Can I do that all in React native? Edit: don't need to bring up electron.

You should be able to do all this, if it is as flexible as RN for mobile

Re: React Native for Windows and Mac

#62
post #5

Flutter seems to be gaining ground on React Native. And they also have web and desktop ports. Recently flutter overtook react native on Google trends.

Windows Forms was released on 2002 and is still supported by Microsoft. How long do you think Flutter will be supported by Google? For dev technology, Microsoft has a well-deserved reputation for supporting products for a long time.

> How long do you think Flutter will be supported by Google?

I am curious about how often this sentiment gets brought up about Go or Kubernetes.

Re: React Native for Windows and Mac

#64

I swear to gosh Facebook, if you tempt my employer into making me write Windows apps...

I would be happy to add Windows as a platform to my apps. More market == more money. Only as an add-on. I wouldn't want to write Windows exclusive apps for sure.

Re: React Native for Windows and Mac

#65

Earlier quoted context omitted.

Wow, that React Native dep graph is crazy! But as I browse it, most of the dependencies seem to be build-time, not runtime dependencies (i.e. it seems like most of them are related to Babel). The React comparison doesn't include dev dependencies. While react-native does have more dependencies than vanilla react, on first glance the list doesn't seem too crazy https://github.com/facebook/react-native/blob/master/packa…

The package.json file hasn't been remotely close to representative of the actual dependency count of a JS project for years.

sure, but it gives you the list of packages to look at in the dependency visualizer

Re: React Native for Windows and Mac

#67
post #18

I think the killer feature here is natively targeting Windows AND macOS simultaneously. The only cross-platform alternatives that I've seen in the ecosystem use either web or Gtk in the frontend, and both of these have a distinctly non-native feel to them.

Delphi does this. GDI+/DirectX on Windows, OpenGL on macOS, and GTK+ on Linux (and OpenGL on Android and iOS). Single source responsive UI.

Re: React Native for Windows and Mac

#68
post #18

I think the killer feature here is natively targeting Windows AND macOS simultaneously. The only cross-platform alternatives that I've seen in the ecosystem use either web or Gtk in the frontend, and both of these have a distinctly non-native feel to them.

[deleted]

Re: React Native for Windows and Mac

#69
I tried using this a few months ago, as well as React Native for mobile and React Native Web for web, and I felt like they were all just hacks glued together to get cross-platform support, and RN isn't even native, it still includes a Javascript bridge. Build dependencies and packages were a nightmare, things continuously broke. I tried Flutter afterwards and it just felt like a breath of fresh air. Everything "just worked", on all the platforms I tested it on: web, iOS, Android, Windows, Mac, and Linux. Updates on one are hot reloaded to another. In contrast, Expo sometimes just broke. This was all wrapped up in one package instead of needing to use separate build chains for each platform.

I wonder if React Native can do all of this officially, but I suppose that's not their prerogative, given that RN is mostly used by Facebook for apps and these other platform efforts are by third parties, like Microsoft here.

Re: React Native for Windows and Mac

#70

Is anyone able to provide a map of modern frameworks? With React-native, React-redux, Angular, Vue and probably a bunch of others. I'm really not sure what's relevant now and what was relevant 6 months ago. I'm genuinely curious, but it's pretty difficult to grasp and no framework homepage is going to tell you "Don't use me, I'm about to be a dead project!" and every developer will tell you their preferred framework…

React, Angular, and Vue are the big 3 web frameworks. Of which React is still more popular than the others I believe, and it takes a slightly different approach. While Angular and Vue use string-templating DSLs to control rendering, React uses JSX which is a thin syntax sugar over JavaScript (and allows you to mix JavaScript in with it). React is also more functional. In practice I find this makes it more flexible, and easier to debug. Angular and Vue are very similar, but Vue has the reputation of being simpler while Angular is the Enterprise Java of the web view.

There are a bunch of others that are less popular such as Ember, Svelte, and Inferno which are also decent in their own right, but the ecosystem of libraries around them is smaller.

The most important libraries to know about in the React ecosystem are React-Router for routing, and either Redux or MobX for state management. There are other options, and for small apps you could get away without a state management library, but these are the mainstream options. I'm not super-up on the Angular/Vue ecosystems, but I believe they're more integrated (e.g. they provide more first-party libraries).

Almost everyone who is using these frameworks is also using either Babel or TypeScript together with Webpack for bundling. There are other options for bundling such as Parcel and Rollup, and again it is possible to get away without bundling or transpiling if you really want to, but Webpack is still the mainstream option for applications (Rollup is well-suited to libraries).

React-native is a different beast. It's a cross-platform mobile (and now desktop) framework rather than a web-based one. It uses React executed in a JavaScript VM to control rendering, but it renders native mobile UI toolkits. There are similar projects for Vue and Angular, but unlike the web versions which are competitive with React, they are nowhere near as mature. React-native's real competition for cross-platform mobile development is Flutter. Flutter is written using that Dart language, and takes a different to React-Native. Rather than compiling down to native UI widgets, it custom-renders everything. This makes it more reliable and consistent across platforms, but also more limited in what you can because you can't hook into the existing ecosystem of native ios/android libraries nearly so easily.

My subjective view on this is that React-Native is just about on the cusp of reaching maturity, while Flutter doesn't quite seem to have enough momentum to reach the mainstream. Although I'd love to be proven wrong on that one.

Post reply on HN