Live data from Hacker News

React Native for Windows and Mac

microsoft.github.io

351–360 of 505 posts

Re: React Native for Windows and Mac

#351
post #319

Earlier quoted context omitted.

> Flutter itself seems nice, but Dart as a language is a pretty big downgrade from TypeScript. It definitely isn't, Dart is an advanced clean, strongly typed classical language without JS's warts that's just as clean & productive with a clean complete & well-defined standard library, native support for modules, consistent async/await in all libraries, etc. I love TypeScript, but it's major productivity advantage over…

As far as I know, Dart still has all types nullable by default, which makes it easy to run into problems with things like initialization (not realizing that a thing may still be uninitialized at some point / only loaded later) or just plain optional data (assuming some thing is always present when sometimes it's not). It's like partially dropping down to dynamic typing, where you have to keep all this in your head ma…

> Dart still has all types nullable by default

TypeScript is even worse in that regard since it has to deal with JS that wasn't written in TypeScript & there's no way to verify the runtime object complies with the interface you say it does. Then of course JS has to deal with multiple null & undefined values & even more falsy values, ultimately TypeScript provides nice static analysis but also a false sense of security as there's no guarantee that the compile time static analysis matches the actual types / values at runtime.

At least with Dart, you're guaranteed everything is written in Dart so you can have confidence in the static type analysis is actually going to be valid at runtime. With that said you can use the `--enable-experiment=non-nullable` to enable its Sound non-nullable Types feature [1]

> The expresiveness, the ability to accurately describe data structures with its type system just doesn't seem to be there. It seems about on par with Java in that regard.

This is a gross mischaracterization that I'm just going to assume you're familiar with Dart at all. It's vastly more modern and less verbose than Java in basically all aspects: type declarations, auto properties/getters/setters, auto constructors, implicit interfaces, factory constructors, mixins, typedefs, inference, lambdas, async/await, extension methods, optional parameters, string interpolation, single integer type, cascade/chaining, null guards/assignment/coalescing, generators, operator overloading, Callable classes, first class functions, everything's an object, duck typing with noSuchMethod, etc.

[1] https://github.com/dart-lang/language/issues/110

Re: React Native for Windows and Mac

#353
post #103

Earlier quoted context omitted.

> Recently flutter overtook react native on Google trends. How did you query this? I want to have a look, but the fact "flutter" shows data since 2004 means the terms I'm using are inflated [1]. Flutter is a dictionary word after all. [1]: https://trends.google.com/trends/explore?date=all&geo=US&q=r...

Don't limit your search to the US. The "dictionary word" problem is reduced in worldwide search, which shows a more convincing trend for flutter. Though I wouldn't say it has a large or clear-cut lead on React Native. https://trends.google.com/trends/explore?date=all&q=react%20...

Oh true, good idea!

Re: React Native for Windows and Mac

#354

Earlier quoted context omitted.

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 develo…

Check out React context to avoid this property passing, which is annoying, I agree.

Did you know that Redux is now basically built into React?

https://medium.com/simply/state-management-with-react-hooks-...

https://blog.logrocket.com/use-hooks-and-context-not-react-a...

Re: React Native for Windows and Mac

#355

Earlier quoted context omitted.

> If I pay a premium for my platform this is something that you might value but I think it's fair to say it is already a minority position. phones and the web have become the primary platform for software delivery, and people do not treat their desktop if they even have one as some sort of premium platform, it's a terminal for the internet. at this point, people are probably more familiar with the look and feel of we…

Follow the money. People pay for what they value. Who is paying money for desktop software besides games, Office 365, and the Adobe Creative Suite? Who values desktop software enough to pay for it? I know in the Mac market at least, the few indy developers making money are not writing apps using cross platform SDKs.

Office already uses react native for parts of their desktop and mobile platforms, win32 is in the process of integrating react-native support. So does Adobe at least if their github is any indication.

And if you look at the end consumer software which have billions of users, who in one way or the other pay for it, it's almost always built on web tech these days. Discord, Skype, Slack, Spotify, and so on.

Of course there's professional or industrial software written in native code. But that's not because it's popular, it's because it's niche and specialised. The business model of charging upfront isn't exactly a sign of popularity, if anything it's the opposite.

Re: React Native for Windows and Mac

#356

Earlier quoted context omitted.

Flutter on the web is absolutely insane. For those who don't know, it basically strips away everything and wraps it in a big terrifyingly complex mess of code and renders everything in a canvas. Flutter advocates like to claim that that's "only a fallback" for when things get complex but as far as I can tell the vast majority of things (including the simplest examples from Flutter itself) force the entire thing into…

Adobe Flex was my most productive client development experience over the past 20 years. I transitioned to Android _but_ there were many hideous things with that (e.g. ghastly emulator, legacy Java support etc.). My personal hope is that Flutter gains traction and the web can move beyond current web/native technology. Postscript / PDFs aren't suitable for game experiences...and to my mind web standards have been shoeh…

Ahhhh Adobe Flex with MXML and ActionScript3. Before Typescript and React with JSX got popular that was the cool kids club. RIAs yo! Rich internet applications.

I loved what Flex brought to the table. Too bad Adobe didn’t open source flash and let it die.

Re: React Native for Windows and Mac

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

It makes me think of Google Web Toolkit.

Not exactly abandoned - it seems to have been maintained for 10 years, although no stable release for the last couple of years.

It does feel like it would have been a dead end to get into though.

My worry with Flutter is the same - it won't get large enough adoption by other tech companies, and Google will move on to something else.

I think it'll still hang out as open source project. But will it get the large investment to make improvements as the various OSs change over the long time?

Re: React Native for Windows and Mac

#358
post #321

Earlier quoted context omitted.

I use Slack and other Electron based applications because my job requires it, imposed by our IT or customers, not because I freely have chosen to use them or have the liberty to look for alternatives. Other than VSCode for Rust and TypeScript, my own personal computer is as much Electron free as possible. So don't mistake market share for freedom of choice.

VSCode is a great example. We’ve already established that the average joe out there doesn’t care about whether an app is implemented in electron or not. But VSCode’s success at the expense of every other editor out there indicates that even developers don’t care that much. The important thing is features - which VSCode has, and the speed at which those features are developed and deployed on all platforms - where VSCo…

Some do, while I can't speak for the emacs community the (n)vim community is very active and engaged. There are modern vim plugins for nearly everything. The developers using VSCode tend to be developing on overpowered workstations where the difference is less noticeable. It doesn't mean it isn't wasteful. At some point we'll hit some upper bounds as an industry and have to rethink how we develop software, the trend back towards statically typed, compiled languages like Rust, Swift, Go are already leading us in that direction.

Edit: a word missing

Re: React Native for Windows and Mac

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

This describes what I am currently missing the most in the node ecosystem. Deno is a good approach but it will take some time to see how adoption goes. I would prefer some fine grained capability-based solution. Approaches similar to this have often been articulated [1]. Many of my concerns are best described here [2]. There even was an article from someone who would have been able to overtake many high profile npm accounts with very little effort some time ago (cannot find it anymore).

With tighter snyk integration into npm and the acquisition of npm through ms one could argue that security bar may have risen/will rise but I (speaking as a js/ts dev) am still sceptical. I haven't really looked to deep into stuff like selinux/apparmor/firejail [3] maybe someone can give an opinion on this. I'd wish for something that would be codeified on package level to make review easier and give me some peace of mind.

For now my plan is to dockerize most of my projects and it's dependencies. It should give a little more protection against malicious postinstall scripts.

Unfortunately, I depend more and more on npm modules outside of projects (coc-vim comes to mind/for others it may be vscode etc.).

[1] https://medium.com/hackernoon/npm-package-permissions-an-ide... (2018) [2] https://medium.com/hackernoon/im-harvesting-credit-card-numb... (2018) [3] https://github.com/netblue30/firejail/blob/master/README.md

Re: React Native for Windows and Mac

#360
post #333

Earlier quoted context omitted.

Sad for developers. What I had in mind regarding desktop were big tools like Blender, Photoshop, Blender, IntelliJ IDEs, which existed long before Electron. I think it clearly shows that complex UI apps require cross platform UI, or will remain single platform (Xcode, Visual Studio).

Let me tell you a story... I was at a crossroads in 2008. I had been developing mostly in C for a decade and decided to pivot to being your standard “Enterprise Dev”. I had a choice between moving my career to C# or Java. I chose C# partly because of the bad stench of the cross platform Java IDEs at the time. Give me VS or Xcode any day over a Java based IDE. Photoshop definitely isn’t using a non native runtime. I d…

Have you heard about our lord and savior, vs code? People are choosing it over full blown vs. Also, I haven’t seen many happy xcode devs.
Post reply on HN