Re:Show HN: Target almost all platforms at once with react n...
by problems on Monday January 23, 2017 @10:13AM
(#13462672)
Huh, cool, I'll definitely check this out more then. Hopefully something like this will catch on and replace the browser based, non-native UIs that seem far too popular these days.
Re:Show HN: Target almost all platforms at once with react n...
by hardwaresofton on Monday January 23, 2017 @09:55PM
(#13468443)
Yeah, this tech is definitely pretty amazing. I'm not the biggest fan of facebook so I'll bash them a little bit here -- their biggest success with this was envisioning it (or bolting on) the fact that the react model wasn't built only for the DOM. Originally React & ReactDOM were the same (maybe it was temporary), but when they started to target more platforms, they split them out and that's been a changer as you can see now.
Honestly I think companies that opt for a browser-based non-native UI do those for reasons that won't change just due to RN existing. Once developers get comfortable with RN, and start offering themselves as "we do native apps in half the time, give your users better-than-mobile-browser-site performance", I think the companies that were content to jam a webpage into an app will start improving.
Also note this article with a pretty good criticism of React (I find those are lacking these days): https://bitquabit.com/post/the-more-things-change/
tldr; Turns out react is a little bit similar to a thing called COM, but maybe we're better at this pattern now and things won't become spaghetti
> With React Native, you don't build a “mobile web app”, an “HTML5 app”, or a “hybrid app”. You build a real mobile app that's indistinguishable from an app built using Objective-C or Java. React Native uses the same fundamental UI building blocks as regular iOS and Android apps. You just put those building blocks together using JavaScript and React.
You can use native code, the JS components render to native things -- there's a lot to it, and I'm sure I can't explain it properly, better to just check out their guide.
Also, React Native was not built to be used on all the platforms -- I remember when RN for android (I believe IOS support was out first?), people started asking (of course) whether they could write code that would run on both platforms and the tools team said something to the effect of "the code will look similar, but will not be the same".
Of course, that doesn't stop someone from writing components that compile to other components or something or writing some sort of cross-platform group of components on top.