Live data from Hacker News

React Native for Windows and Mac

microsoft.github.io

261–270 of 505 posts

Re: React Native for Windows and Mac

#261

Earlier quoted context omitted.

I've done a few client projects in the past using React Native. I get the appeal of having a "single" codebase for iOS and Android, but I absolutely detested using it. I'm quite sure and aware of people that love it, but just from my personal development background, it just never really seemed appealing to me. Definitely not a fan of how state is handled. I've rolled my own system, Redux, and a host of other solution…

can you go into more detail about "how state is handled"? I wouldn't have considered that to be one of the offerings of React Native (or Flutter).

Well, for a toy app, it's pretty simple, but once you begin to build real-world apps, with 30 or 40+ components, and their children, I just found passing state and props around a bit messy and hacky. Of course, then you introduce Redux, and all is well. But now you have to deal with transducers and actions, and so on. I just didn't find the tradeoff worth it, and prefer native development.

I'm sure every React developer has at some point found themselves banging their head on the wall trying to figure out why some child component isn't updating.

And yes, it's a personal preference, but I'm also not a fan of Javascript. If another client wants a single codebase app, I'm really gonna give Flutter a nice long look. I've read the docs, and it looks quite appealing.

Re: React Native for Windows and Mac

#262
post #129
post #81

Earlier quoted context omitted.

The problem with flutter is you never know when Google will stop investing in the product at any moment when the devs shift their priority.and let it die on the vine.

People love to say this but rarely provide concrete examples. Google has a habit of discontinuing unsuccessful services, not technologies like SDKs or whole programming languages.

Dated, but Google Gears?

Re: React Native for Windows and Mac

#263

Earlier quoted context omitted.

Most native apps I've downloaded are well into tens or hundreds megabytes. I just tried a few big popular sites with caching off and none of them downloaded more than a couple megabytes of javascript. I'm really skeptical of the popular wisdom around here that web dev is doing something especially egregious when it comes to build sizes or dependencies.

The browser is where the hundreds of megabytes vanish to when you use a JS app instead of a native one. That might still be better (I'm undecided, personally), but it's worth recognizing that heavy native app is still there, just shared with a lot of other JS apps.

You could say the same about system libraries/binaries every native app needs to run

Re: React Native for Windows and Mac

#264
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…

> but the depgraph above fills me with doubt for use in sensitive applications such as in finance or healthcare.

Fortunately, in such industries you don't have to worry about being cross platform particularly. Go write C# and WinForms (or whatever it is these days). Or use Lazarus/FreePascal if you do need to be cross platform.

Re: React Native for Windows and Mac

#265
post #88
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…

Any large financial services company you're working with is already deploying sensitive apps on Node, for what it's worth.

Right, but they’re probably mirroring dependencies locally, scanning them regularly, and have a process for adding new ones that isn’t “npm works on my desktop”.

Re: React Native for Windows and Mac

#266
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…

I like the sound of it, but it seems like it might descend into something like checked exception hell where a given package D works fine as a dependency of package A but not of package B (because package B drops some privileges that D expects to have).

Maybe it could be solved by type checking during dependency resolution time: instead of just checking version numbers, also check capabilities that transitive dependencies declare.

Maybe you could slowly boil the ocean by assuming that everything that doesn't declare required capabilities implicitly requires the "ALL" capability, and triage+prioritize a growing core of packages that have explicit capability requirements. In my mind it's kind of like purifying functions in a library: you start at the lowest level / leaves of the call graph and make sure they don't do any I/O, and then the things that call them can be made pure and so on up the chain.

Re: React Native for Windows and Mac

#268
React Native is best understood as an insurgent attack on native mobile platforms, funded by overwealthy and bloated companies that do not control mobile platforms, but feel entitled.

Microsoft and Facebook attacking Apple and Google basically.

IMHO it's not a sincere effort to make a nice platform. It moves fast and breaks things in major ways with each minor point release, with the current excuse being that it's not at 1.0 yet. But it offers just enough to introduce FUD into the competitors' ecosystems. And that's the entire goal as far as I can tell.

If you value getting useful deep knowledge, stay away. If you want to play in the shallows and be patching stuff up all the time with JavaScript/TypeScript, React Native is an option.

Re: React Native for Windows and Mac

#269
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…

What's your take on the way Web Assembly approaches trust of dependencies?

https://hacks.mozilla.org/2019/11/announcing-the-bytecode-al...

Re: React Native for Windows and Mac

#270

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…

I like the sound of it, but it seems like it might descend into something like checked exception hell where a given package D works fine as a dependency of package A but not of package B (because package B drops some privileges that D expects to have). Maybe it could be solved by type checking during dependency resolution time: instead of just checking version numbers, also check capabilities that transitive dependen…

> I like the sound of it, but it seems like it might descend into something like checked exception hell where a given package D works fine as a dependency of package A but not of package B (because package B drops some privileges that D expects to have).

That sounds like it would be working. If you declare that your package doesn't need network, and it fails because it used the network, that sounds like a bug was caught.

Post reply on HN