Live data from Hacker News

React Desktop – React UI Components for OS X El Capitan and Windows 10

github.com

21–30 of 74 posts

Re: React Desktop – React UI Components for OS X El Capitan and Windows 10

#21
It's cute and I can see the appeal but I think that even if you are making a "desktop app" that has its own executable, you are better off just using nice HTML. It will be cross-platform, it will probably look nicer (imo, the desktop-style looks somewhat dated). And most importantly, it won't confuse users when it doesn't behave as expected. Getting hotkey behavior etc right is hard, if not impossible -- some things change with international settings and some key combinations are unavailable to the browser anyway.

Re: React Desktop – React UI Components for OS X El Capitan and Windows 10

#22
post #4

Please forgive the simple question, but... Why does this exist? Is creating desktop programs out of HTML code really a good idea?

Because NodeJS is popular and desktop apps were getting small and efficient so we crammed a 30MB Chrome runtime in there.

+1

With all respect to leichzeit0 comment, IMHO, JS is an ugly language, with way too many pitfalls [0]. Even big boys [1] use CoffeScript to transpile into JS.

JS for cross platform desktop development may be an easy thing to manage, though it can become unusable and clunky super fast. You can spot JS desktop apps, just by the size of executable, which is at least 5-10 times bigger than you could expect (Spotify - 130MB). They have poorer performance, can drain your battery faster, and some OS native features/guidelines must be implemented in a custom way, or could not be implemented/used at all. Sorry, for my critical and conservative view, but it's just my opinion (probably due to annoyance of overflow of laggy (web)apps, riddled with complex JS, where it could be avoided).

Probably it's the price of 'cross-platformity'.

[0] https://www.youtube.com/watch?v=20BySC_6HyY (original site does not load for whatever reason)

[1] https://github.com/basecamp/trix

Re: React Desktop – React UI Components for OS X El Capitan and Windows 10

#23
post #19

On OS X, how will these components interact with the accessibility features?

I would guess that it does not interact with accessibility now. These components are just bunch of styles to make it look like a 'native' widget, though it's not a real native widget of OS. Though, it leaves me with a question, how can you set up OS X accessibility features, in your web app/UI, that it could be used by OS X? I would guess you can't, and it's all left to the browser.

WebKit supports ARIA attributes. If you aren't using them in your web code already, VoiceOver can probably navigate your page just fine, but it's subpar compared to a document that has been marked up with rich accessibility information.

Re: React Desktop – React UI Components for OS X El Capitan and Windows 10

#24
post #7

The widgets aren't native, which would be about a thousand times cooler. They are fakes made out of CSS.

Here’s a real reactive-native for desktop OS X Cocoa I found: https://github.com/ptmt/react-native-desktop Currently just "hacking weekend" level maturity. https://github.com/facebook/react-native/issues/247#issuecom... I have never actually tried it, but this one is real native controls. It’s on my TODO list…

Do you have any idea how the native bridge works? I wonder if it could be done for Windows - what's the equivalent UI toolkit?

Re: React Desktop – React UI Components for OS X El Capitan and Windows 10

#25

Earlier quoted context omitted.

Here’s a real reactive-native for desktop OS X Cocoa I found: https://github.com/ptmt/react-native-desktop Currently just "hacking weekend" level maturity. https://github.com/facebook/react-native/issues/247#issuecom... I have never actually tried it, but this one is real native controls. It’s on my TODO list…

Do you have any idea how the native bridge works? I wonder if it could be done for Windows - what's the equivalent UI toolkit?

Is that even necessary for windows? Doesn't windows already have this abstraction layer with windows.js?

Re: React Desktop – React UI Components for OS X El Capitan and Windows 10

#26

Earlier quoted context omitted.

Because NodeJS is popular and desktop apps were getting small and efficient so we crammed a 30MB Chrome runtime in there.

Actually it's more like this: That ugly language called Javascript that everyone derided and said was "too shit and slow to ever write a Demo in" back in the 90s when all the "real developers" were writing server side scripts in Perl and left the frontend people to their own devices caught up with them. They kept pushing the boundaries, discovering things like XMLHttpRequest, and using that crap little language. Even…

Server-side JavaScript was a thing in the 90s with Classic ASP.

Re: React Desktop – React UI Components for OS X El Capitan and Windows 10

#27
post #22

Earlier quoted context omitted.

Because NodeJS is popular and desktop apps were getting small and efficient so we crammed a 30MB Chrome runtime in there.

+1 With all respect to leichzeit0 comment, IMHO, JS is an ugly language, with way too many pitfalls [0]. Even big boys [1] use CoffeScript to transpile into JS. JS for cross platform desktop development may be an easy thing to manage, though it can become unusable and clunky super fast. You can spot JS desktop apps, just by the size of executable, which is at least 5-10 times bigger than you could expect (Spotify - 1…

True. Popcorn Time is written with NodeJS. Hence it takes a very long time to install or upgrade (has to handle thousands of files) and has rather high CPU use at runtime.

Re: React Desktop – React UI Components for OS X El Capitan and Windows 10

#28

Earlier quoted context omitted.

Do you have any idea how the native bridge works? I wonder if it could be done for Windows - what's the equivalent UI toolkit?

Is that even necessary for windows? Doesn't windows already have this abstraction layer with windows.js?

Good point - https://github.com/winjs/react-winjs

Re: React Desktop – React UI Components for OS X El Capitan and Windows 10

#29
post #22

Earlier quoted context omitted.

Because NodeJS is popular and desktop apps were getting small and efficient so we crammed a 30MB Chrome runtime in there.

+1 With all respect to leichzeit0 comment, IMHO, JS is an ugly language, with way too many pitfalls [0]. Even big boys [1] use CoffeScript to transpile into JS. JS for cross platform desktop development may be an easy thing to manage, though it can become unusable and clunky super fast. You can spot JS desktop apps, just by the size of executable, which is at least 5-10 times bigger than you could expect (Spotify - 1…

>> "JS is an ugly language"

>> "riddled with complex JS"

If you pick a technology by the aesthetics of the language, I'm pretty sure you'll make a bad decision no matter what. Not you like in you, but in principle. :)

The code is clean if you write it well. Ugly code comes in all parentheses positions.

Re: React Desktop – React UI Components for OS X El Capitan and Windows 10

#30

Man it's great to see effort being put into a platform-sensitive React component set. We've been working on React components for N1, and it'd be cool to swap them out for an open source set one day. The thing is, I'm not sure 100% native appearance is the way to go. I think Spotify nailed a cross-platform desktop experience using a UI that is distinctly non-native. For folks just learning about Electron / web-based d…

Either you go with a non-native look, or you use native components.

Mimicking native with CSS is only getting you to the uncanny valley of UX.

Post reply on HN