Live data from Hacker News

React Native for Windows and Mac

microsoft.github.io

91–100 of 505 posts

Re: React Native for Windows and Mac

#91
post #17

React Native scares me with its dependency webs: http://npm.anvaka.com/#/view/2d/react-native From my experience, it's really great to work with and definitely saves a ton of work, but the depgraph above fills me with doubt for use in sensitive applications such as in finance or healthcare. For this reason, I've been trying out Flutter or even considering to go back to native apps. Perhaps there's some kind of middle…

Speaking of trusting trust, I think I'd love for Node¹ to support something like OpenBSD pledge (2) and unveil (2) for imports, where once you enter into a particular package certain capabilities are disabled. I would like to be able to assert that when I import some package, it and all of the packages it recursively includes do not perform network requests, do not use the filesystem outside of some folder, and so on…

Deno (a modern JS runtime from the same original author as Node) is heading this direction, albeit it’s currently more a traditional opt-in than OpenBSD-style opt-out.

Re: React Native for Windows and Mac

#92

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…

> RN isn't even native, it still includes a Javascript bridge

"Native" doesn't describe the programming language, but the GUI layer. Native == non-web-browser.

Re: React Native for Windows and Mac

#93

Not sure what the advantage here is over Electron. I know the chromium engine is a resource hog, but the scalability/mix between platforms makes it worth it. Curious to know what your thoughts are folks!

It uses the platform’s native APIs to render UI widgets, so it looks and feels like a true native desktop application, while still giving you a web flavored dev experience.

Re: React Native for Windows and Mac

#94
post #59

Earlier quoted context omitted.

Speaking of trusting trust, I think I'd love for Node¹ to support something like OpenBSD pledge (2) and unveil (2) for imports, where once you enter into a particular package certain capabilities are disabled. I would like to be able to assert that when I import some package, it and all of the packages it recursively includes do not perform network requests, do not use the filesystem outside of some folder, and so on…

> A fine grained capability system for packages would dramatically improve the safety profile I think Deno does that (the new project by Node's original creator): https://blog.logrocket.com/what-is-deno/

Woohoo! I just noticed Deno is at release candidate stage for v1.0.

Re: React Native for Windows and Mac

#95
post #83
post #17

React Native scares me with its dependency webs: http://npm.anvaka.com/#/view/2d/react-native From my experience, it's really great to work with and definitely saves a ton of work, but the depgraph above fills me with doubt for use in sensitive applications such as in finance or healthcare. For this reason, I've been trying out Flutter or even considering to go back to native apps. Perhaps there's some kind of middle…

I believe this is something that next-gen frameworks worked around: http://npm.anvaka.com/#/view/2d/svelte http://npm.anvaka.com/#/view/2d/solid-js

React doesn't suffer from this. It's React Native.

Re: React Native for Windows and Mac

#96

Earlier quoted context omitted.

It is not. Here's the GitHub for the Windows implementation: https://github.com/microsoft/react-native-windows And here's the fork of React Native for the Mac one (it doesn't seem to be as polished as the Windows one yet): https://github.com/microsoft/react-native-macos

I would be very surprised if they didn't use any pieces used by Edge (how else would they render css?). A quick search of their code though and I couldn't find it. Perhaps I assumed too much

React native doesn't really use css - there are no .css files, no cascading either. It's more like a style engine that uses a subset of css ideas as a starting point.

It uses flex-box (and only flex-box) for layout, adds some convenient shorthands - marginVertical, marginHorizontal, and does some surprising (but useful) things like has transform take a JS array of key value pairs - https://reactnative.dev/docs/transforms#transform

Re: React Native for Windows and Mac

#97
post #83

Earlier quoted context omitted.

I believe this is something that next-gen frameworks worked around: http://npm.anvaka.com/#/view/2d/svelte http://npm.anvaka.com/#/view/2d/solid-js

React doesn't suffer from this. It's React Native.

Interesting, you are right AFAICT (react has numerous packages and I'm not totally sure how they relate).

http://npm.anvaka.com/#/view/2d/react

http://npm.anvaka.com/#/view/2d/react-dom

Re: React Native for Windows and Mac

#98
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.

Sciter then (https://sciter.com):

- multiple platforms...

Yes: Windows (x32,x64, ARM64), from XP to 10, MacOS, Linux/GTK, IoT and mobiles.

- multiple windows -

Yes. Multiple desktop windows and you can even render separate DOM elements in popup windows.

- rendering to a window that isn't owned by the UI being rendered

Yes, you can render it on top DirectX, OpenGL, Vulkan (coming) or in child window/nsview/gtkwidget. There is also Sciter.Lite that allows to render UI without any DWM - on frame buffer / video memory directly. Check : https://sciter.com/sciter-and-directx/

- don't need to bring up electron.

Not Electron. All this in monolithic dll/so (5..9mb) that even can be linked in statically.

- consistent rendering across multiple platforms.

Check screenshots of https://notes.sciter.com/ , are they consistent enough?

- ... for React

React (Reactor in Sciter terms) is implemented natively. JSX (SSX in Sciter) is a part of language/runtime - no need for additional compilers, etc.

- I'd love to abandon my C/C++ ...

No need to. You can still manage (update, handle events) UI directly from C++ if needed. You can even create custom native DOM elements that can even draw themselves by native code.

Re: React Native for Windows and Mac

#99

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…

I've had the exact opposite experience, but I mostly use Java over Flutter for Android. Expo can be fairly limiting and breaks a lot, but core React Native is wonderful and does everything I need with a couple exceptions (FCM and more fine grained microphone support). I also have a dedicated Android native module for my app, and a lot of React Native libraries can probably be consolidated down to one module and directly using the Java libraries on Android.

What dependencies are you using that continuously broke? Did you track your package lock file on Git?

EDIT: Ive also tried React Native Web and it pretty much worked OOTB. Alerts were the only thing I found that weren't implemented, but they didn't show any runtime errors or instability

Re: React Native for Windows and Mac

#100
On the React Native MacOS fork:

> This repository is a working fork of facebook/react-native that adds support for the official React Native for macOS implementation from Microsoft.

Does anyone know when these changes are planning to be upstreamed?

Post reply on HN