5 ms·
So, I've been considering learning React recently, and this is a reason for it. How native is react native? Does it use the platform's look and feel or essentia
by problems 10y ago
So, I've been considering learning React recently, and this is a reason for it. How native is react native? Does it use the platform's look and feel or essentially feel like a clunky web browser, more similar to NW.js or electron apps.
- hardwaresofton 10y agohttps://facebook.github.io/react-native/ https://facebook.github.io/react-native/ > 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.
- problems 10y agoHuh, 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.
- hardwaresofton 10y agoYeah, 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/ 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
- Jonovono 10y agoI have enjoyed react native and found it pretty good. I remember doing a few apps way back in Phonegap and I don't get the same feel at all which is nice. I actually wrote an app in native swift and then re wrote it in React native. I don't have any benchmarks but using it I havn't noticed it's any slower than the native one. And I think it looks better! Because, for me, it's easier and quicker to create things in JS than Swift. This is the app btw. 100% React native! https://itunes.apple.com/us/app/rekindlr/id1072608462?mt=8 https://itunes.apple.com/us/app/rekindlr/id1072608462?mt=8
- tluyben2 10y agoI have seen that people who come from native (Java/ObjectiveC/Swift and even Xamarin) write more robust React Native apps than people coming from HTML5. That is not strange by any means but something to keep in mind. It is not 'magic'.
- Mayzie 10y ago> How native is react native? Does it use the platform's look and feel No. If you want native look-and-feel, you'll need to download and install third party libraries, e.g. for Material Design. However, those third party libraries are implemented in 100% JavaScript and do not utilise the native Android components (rather just rebasing off MDL [1]), which will just end up making your app "feel like a clunky web browser", particularly when debugging or rendering lots of those components to screen. [1] https://getmdl.io/started/ https://getmdl.io/started/