Ionic React vs React Native
真人线上平台ionic react and react native are two great options for building apps, but they differ in some important ways. we explore the differences in detail and make a recommendation on which one your team should adopt.
the react ecosystem has two major ways to build cross-platform mobile apps: ionic react and react native. however, the two projects have different goals, features, and capabilities, and it’s important to understand the differences before investing in one.
in this article we outline the differences between the two projects and make a recommendation based on the type of apps your team is building, the skillsets of the engineers on your team, and the importance of enterprise support and functionality.
What is Ionic React?
ionic react is an open source ui and native api project consisting of cross-platform ui components and native functionality for building ios, android, electron and progressive web apps using react and standard web technology.
真人线上平台ionic react is the official react version of the popular ionic framework, used by millions of web developers and powering mission critical apps for companies like amtrak, aaa, burger king, home depot, and more.
What is React Native?
because react native does not use dom elements for rendering, it requires using a different rendering library than traditional web-based react.
真人线上平台react native is used at companies like shopify, facebook, and wix.
Difference: Web vs Native
真人线上平台ionic react is web-first, meaning that it implements native ios and android ui patterns using cross-platform, standards-based web technology instead of accessing platform ui controls directly.
in contrast, react native provides an abstraction through react that controls platform ui controls directly.
真人线上平台there are some benefits to react native’s approach. since react native uses mostly standard ios and android controls under the hood, in some cases performance may be higher. additionally, interfacing with an existing native app’s ui controls is easier. apps created with react native will look the closest to stock platform apps out of the box.
there are a few downsides to this approach, however. native controls are harder to customize than most web developers and designers are used to, so they may find react native apps more challenging to design custom ui experiences with. since react native is not a true browser environment, standard css, html, and dom techniques can’t be used (though react native does have a css-like utility). additionally, existing react web code and libraries likely won’t be portable to react native without heavy customization.
This also means the development process for each is different. Ionic React is the most similar to traditional React web app development since Ionic React apps are React web apps. That means Ionic React will offer a web developer a fast and familiar development experience directly in Chrome or their browser of choice, and many apps can have a significant portion of their functionality built right in the browser. Ionic React can also easily be added to any existing web-based React app.
真人线上平台react native does not use traditional web development tools directly but does have some custom support for integrating with a chrome debugger, but will require running in an emulator or on device unlike ionic react and will not be a true browser debugging experience.
真人线上平台finally, because ionic react is based on web technology and the entire web platform, it doesn’t require making a bet on a new platform. chances are your team is already heavily invested in the web platform. react native, in contrast, is a self-contained platform and ecosystem and must be self-sufficient in order to succeed in the long term.
Difference: React DOM vs React Native
react itself is an abstract ui library that supports multiple platform rendering libraries. the two main ones are react dom (react-dom on npm) and react native (react-native on npm), and they are not compatible.
react dom is, by far, the most popular rendering library for react. by today’s numbers (feb ‘20), react dom is installed 25m times per month compared to react native’s 1.4m, which is an 18x difference.
this distinction is important because react libraries must explicitly support specific rendering libraries. given that react dom has considerably more usage, it makes sense that most library authors target it first. thus, react dom has the broadest compatibility with the react ecosystem. react native developers, in contrast, will have to find libraries that explicitly support it.
this means that ionic react will likely just work with any react library now and in the future, but react native may not.
Difference: Progressive Web App support
progressive web apps are a new standard for building rich, native-quality mobile apps but distributing them through a web browser instead of an app store. progressive web apps have benefits for user engagement, search engine optimization, and shareability, and are becoming popular for consumer and enterprise apps.
真人线上平台ionic react has first-class progressive web app support, while react native does not support progressive web apps officially at all.
If Progressive Web Apps are in your team’s future plans, it would be worth starting with Ionic React, which would let your team build and distribute an app to iOS and Android app stores and真人线上平台 to the web as a Progressive Web App at the same time and with the same code.
Difference: Cross-platform Support
react native is a ui library with official support for ios and android app store apps only (there are some unofficial projects that add desktop and web support). in contrast, ionic react officially supports ios, android, electron, and the web using progressive web app technology.
真人线上平台react native takes a “learn once, write anywhere” approach, while ionic takes a “write once, run anywhere” approach. with react native, developers learn one set of concepts (in this case, react with the react native flavor), and then build ui screens specifically for ios and specifically for android.
真人线上平台in contrast, ionic react apps run the same ui on all platforms, utilizing responsive web design, css, and platform-detection utilities to enable developers to customize an app for specific platforms if they choose.
additionally, ionic react uses what the ionic team calls adaptive styling to map core ui concepts like navigation, tabs, toolbars, and buttons to platform expectations (such as material design), while still enabling full designer customizability. react native requires developers to build screens specifically for each platform.
Similarity: Native Access and Functionality
ionic react and react native apps both have full native access and capabilities, since both projects create real native app projects and binaries.
真人线上平台this is a point of confusion since many people incorrectly believe that web-based mobile apps are not actually native apps. a web-based mobile app using ionic react will simply perform more work in a native webview control but is ultimately part of an actual native app ui hierarchy and can access all native apis, call native code, and use any native control (though not directly in the webview).
however, both make it easy to extend an app’s native functionality and developers shouldn’t find any roadblocks with any approach.
thus, ionic react and react native have nearly equal support for running native code and accessing native apis, though each take a different approach to get there.
Difference: Enterprise Support and Functionality
ionic react is truly unique in the mobile ecosystem in that it is backed by a business dedicated to helping teams build and scale mission critical apps. in contrast, react native is an internal facebook project built to improve facebook’s app development process, with no commercial or enterprise business behind it.
真人线上平台today, ionic works with hundreds of medium-to-large enterprises building consumer facing and employee facing mobile and web apps that reach millions of users and drive billions of dollars in revenue. ionic’s entire business is helping these teams be successful and offering a dedicated resource of app experts they can call on at any time.
ionic also offers key enterprise native functionality that is supported and draws its priorities directly from enterprise customers. such functionality includes secure authentication and identity management using advanced encryption apis available on ios and android, high performance offline encrypted data storage, and a library of supported and maintained native functionality.
last but not least, ionic has a suite of mobile devops features available in its appflow product to help teams deploy app updates in realtime and add native app binary building to their ci/cd processes. soon, teams will even be able to submit apps to the app store automatically as part of their workflow!
For teams that have traditional web development skills and libraries and wish to target mobile and web (as a Progressive Web App), Ionic React will likely be a better fit. This explains why Ionic has been successful with startups and enterprise teams with more of a web development history.
Additionally, for teams that need guaranteed support and dedicated enterprise functionality for mission-critical apps, Ionic React may be the only真人线上平台 option given that it is one of very few platform companies in this space dedicated to the business of app development technology.
真人线上平台we believe both projects fill different needs in the ecosystem and will co-exist. we are happy to talk through which platform is a better fit for your team. get in touch with a solutions architect at ionic or give ionic react a try first.