3 ms·
Stupid question, but Ionic is not native, or was not at least. But react-native is actually using only native APIs through Javascript. So if you want to have a
by jrm2k6 10y ago
Stupid question, but Ionic is not native, or was not at least. But react-native is actually using only native APIs through Javascript. So if you want to have a native look and feel, why not go with react-native?
- jdormit 10y agoI don't think that's a stupid question at all. Ionic uses Cordova [1], which basically launches a browser that runs your web page as an "app". That said, Cordova does give you access to native APIs, so you still have access to Bluetooth/camera/whatever. Phone processors and browsers are getting increasingly powerful, so it's totally possible to achieve native or near-native performance in a web view-based app - assuming you properly optimize your JS and HTML. I believe Ionic provides consistent styling, so it's definitely possible to make your app look and feel like a native one. The real win using something like Ionic is that you can build your app using web tech that works equally well on the phone or in the browser, and that your developers already know. The trade-off is that it becomes more difficult (but certainly possible) to make your app look and feel native. React Native gives you many of those benefits, but since it compiles to actual native code you can't reuse your code for a browser app. [1] https://cordova.apache.com https://cordova.apache.com
- n42 10y ago> React Native gives you many of those benefits, but since it compiles to actual native code you can't reuse your code for a browser app. It is entirely possible to reuse your React Native code on the web, especially thanks to projects like react-native-web[1]. [1] https://github.com/necolas/react-native-web https://github.com/necolas/react-native-web
- jrm2k6 10y agoWith react-native, if you isolate your components from your logic enough, (example: use Redux), you can reuse all the logic in a react-native app, and just change the components part, which is usually not that hard, at least on the simple apps I worked on. Another advantage that react-native would have would also be to be able to have native code and react-native code in the same app.
- alasdair_ 10y agoSimple answer: react-native takes longer to learn and longer to build in. It's really good if you absolutely need the performance and have a larger team of developers that all know React. Ionic is ideal for smaller projects (one to about a dozen developers) or varying skill levels, many of whom already know web development to some level and don't want to have to learn yet another way to do things. With Ionic, you can use the same code for your website and your android and ios apps, or at least re-use a lot of it easily. This is a big deal to people who want to keep costs low. If you need serious performance on your mobile app, use react. If you want lower costs, use ionic.
- WA 10y agoa) Most users don't care and don't notice the difference between a truly native app and a well-done hybrid one. Ionic 2 mimics the platforms quite nice. b) With Ionic 2, I can be productive right now, because I can mess around with CSS and HTML. React Native only supports a CSS-like subset and you need to relearn some layout things. It's close to web stuff, but not entirely. c) My gamble is on progressive web apps (PWAs) in the long run.