React NativeA JavaScript Framework
What is React Native
▪ React Native is framework that uses the React to describe the user interface for native devices.
▪ With React Native you can build applications that run on iOS and Android using JavaScript.
▪ Basically, React Native uses node.js, a JavaScript runtime and it’s compatible with Mac, Windows and Linux.
▪ React Native brings the React paradigm to mobile app development. It’s goal isn’t to write the code once and run it on any platform.
▪ The goal is to learn-once (the React way) and write-anywhere. An important distinction to make.
▪ React Native is like React, but it uses native components instead of web components as building blocks.
Why React Native
▪ Here, I am going to show you why we need to switch to the React Native.
▪ IT’S GOT IOS AND ANDROID COVERED.
▪ Initially, Facebook only developed React Native to support iOS. However with its recent support of the Android operating system, the library can now render mobile UIs for both platforms.
▪ Facebook used React Native to build its own Ads Manager app, creating both an iOS and an Android version.
▪ Both versions were built by the same team of developers.
▪ Facebook also made React Native open-source, with the idea that compatibility with other platforms like Windows or tvOS could be worked on by the development community, so stay tuned.
Continue…
▪ REUSABLE COMPONENTS ALLOW HYBRID APPS TO RENDER NATIVELY.
▪ Gone are the WebView components of other hybrid mobile apps. This is possible because React Native’s building blocks are reusable “native components” that compile directly to native.
▪ Components you’d use in iOS or Android have counterparts right in React, so you’ll get a consistent look and feel.
▪ This component-based structure also allows you to build apps with a more agile, web-style approach to development than typical hybrid frameworks, but without any web at all.
▪ The app will have the speed, look, and functionality of a native mobile application.
Continue…
▪ Apply React Native UI components to an existing app’s code—without any rewriting at all.
▪ This is a huge bonus for businesses that want to augment an existing app but don’t want to overhaul it. Incorporate React Native components into your app’s code.
▪ if your existing hybrid app was built with Cordova and Ionic, reuse that Cordova-based code easily with a plugin.
Technology Stack
Continue…
▪ IT’S ONE OF THE TOP MOBILE JAVASCRIPT FRAMEWORKS AMONG DEVELOPERS—AND GROWING.
▪ If you know JavaScript, React Native is a quick pick-up, essentially allowing any front-end web developer to be a mobile developer on the spot.
▪ No need to learn iOS’s Swift or Java for Android—just know JavaScript, some native UI elements, platform APIs, and any other platform-specific design patterns and you’re good to go.
▪ Also included in React Native’s library are Flexbox CSS styling, inline styling, debugging, and support deploying to either the App Store or Google Play.
▪ React is still new, but it’s maturing quickly and Facebook has stated it plans to continue investing in its growth.
Continue…
▪ REACT NATIVE IS ALL ABOUT THE UI.
▪ React Native is focused solely on building a mobile UI. Compared with JavaScript frameworks like AngularJS or MeteorJS, React Native is UI-focused, making it more like a JavaScript library than a framework.
▪ The resulting UI is highly responsive and feels fluid thanks to asynchronous JavaScript interactions with the native environment.
▪ This means the app will have quicker load times than a typical hybrid app, and a smoother feel.
Continue…
▪ NATIVE APP DEVELOPMENT IS MUCH MORE EFFICIENT.
▪ Whereas native app development is usually associated with inefficiency, less developer productivity, and slower time to deployment, React Native is all about bringing the speed and agility of web app development to the hybrid space—with native results.
▪ Under React Native’s hood is Facebook’s popular ReactJS UI library for web applications.
▪ React Native brings all of ReactJS’s better app performance, DOM abstraction, and simplified programming methods to hybrid mobile development.
Continue…
▪ IT OFFERS THIRD-PARTY PLUGIN COMPATIBILITY, LESS MEMORY USAGE, AND A SMOOTHER EXPERIENCE.
▪ Third-party plugins mean you won’t have to rely on a WebView for certain functions. For example,
▪ if you’re adding Google Maps functionality to your app, React Native lets you link the plugin with a native module, so you can link the map up with the device’s functions like zoom, rotate, and the compass, while using less memory and loading faster.
▪ If your app supports older operating systems (and older devices), this can help you keep the app running smoothly.
Why Open Source
▪ Back in 2015, Facebook said in a blog post: "If we work together in the open, we can advance the state of technology together."
▪ Altruism aside, opting to open source code is a tricky decision. Keeping a businesses infrastructure under-wraps has commercial advantages, especially when your technology is your business model.
▪ But the developer community is loyal to those who open up. Web engineers across the world are quick to point out a bug in the code for free.
▪ Developing open source projects helps keep Facebook one of the most coveted companies to work for. Developers want a challenge, and a sense of giving back -and Facebook wants a large pool of talented engineers to pick its employees from.
Pros of React Native
▪ The community
▪ Like with most online developer communities, the React Native one is growing and offers a great network of experienced developers.
▪ If you're starting out, you can get fast answers to common problems and queries while also taking advantage of some of the new updates to React Native.
▪ Faster development
▪ Speed is often the name of the game where development is concerned. Anything that can speed up the development of an application is much appreciated!
▪ With React Native, the development time is considerably shorter. This is mainly down to the amount of pre-formed elements, meaning copy and paste approach can be taken quite often.
Continue…
▪ Closer teams
▪ With React Native bringing both iOS and Android developers together, you'll most likely be working in closer teams. This should make working together and making decisions a lot easier.
▪ Cross-platform building
▪ Not only can you create code that can be copied and reused multiple times, but you can also React Native's codebase to work across iOS to Android. Which is pretty cool and in the long run will save time for the developer and money for their employer.
Cons of React Native
▪ It's still improving
▪ React Native isn't perfect, in fact, it does have some clear limitations.
▪ Some custom modules are missing, meaning that you might lose out on some of its time-saving perks but having to build and create your own.
▪ It is still technical
▪ It's easy to get swept up in React Native's pre-packaged elements. However, for certain things, you'll still need a developer at hand to take care of some technical nasties.
▪ These include incorporating smartphone camera accessibility into an app or push notifications and more sophisticated data handling.
Difference between React Native and ReactJS
React Native ReactJS
React-Native is a framework. ReactJS is a JavaScript library.
React-Native doesn’t use HTML to render the
app, but provides alternative components
that work in a similar way.
ReactJS uses the HTML component to create
a website.
Using React Native you can build Mobile
Application.
Using ReactJS you can build web
applications.
Most components provide similar to HTML
where View component is similar like <div>,
Text is similar like <p>.
ReactJS uses the pure HTML components.
Which Approach is Best?
**Customer experience for mobile is more important to your business than you might think..
While 79 percent of consumers would retry a mobile app only once or twice if it failed to work the first time,
only 16 percent would give it more than two attempts. Poor mobile app experience is likely to discourage
users from using an app again. - Source
Factors to Consider
• Cost - Development & Maintenance
• User Experience
• Performance
• Go To Market Time
• Security
• Device Access
• Offline Mode
• Available Skill Set
How it Works?
Native App
• Native apps are smartphone and tablet applications developed
precisely for a specific mobile operating system.
• iOS developers will code in Objective C or Swift, using X-code
• Android developers will use Android studio and code in Java,
although Kotlin is becoming quite popular.
iOS != Android
Android and iOS are different platforms with different user experiences
and expectations, so a “one size fits all solution” doesn’t really work.
Hybrid App Frameworks
React Native vs Xamarin vs Ionic
Which one lets you create robust apps?
Hybrid App Frameworks
React Native
- Backed by Facebook- Framework for building native apps with React
Xamarin
- Backed by Microsoft- Create iOS, Android and Mac apps in C#
Ionic/Phonegap
- Backed by Drifty/Phonegap- Front-end framework to develop hybrid apps in HTML5 and AngularJS.
What Attracts the Usage?
Native iOS/android
components
Live Reload
Great community
Fast development and test
cycle
Win-win solution of hybrid app
Not dependent on other
technologies
Easy to start from Scratch
Highly customizable
Xamarin No JavaScript, truly compiled
code
Powerful platform for .NET
developers
Ability to leverage visual studio
Great customer support
Native apps with native UI controls
and Native performance
Use of third-party .NET libraries
Enables code re-use on server
NuGet Package Manager
Ionic/
Phonegap Allows for rapid prototyping
Extensibility
Productivity
Best Support and Community
Easy setup, development and testing
Material design support using theme
User Friendly
React Native
PROS1. Code reusability (most of the time) to develop applications for Android, iOS, Windows Phone.
2. Can use JSX to program your application, by using JSX you can write concise HTML/XML-like structures
in the same file as you write JavaScript code
3. Much better performance than Cordova in Ionic.
4. React Native uses multiple cores simultaneously so your JavaScript code runs on one core and the app
view runs on another core.
1. Xamarin has TestCloud which allows you to test your apps automatically
2. Provides 100% code reuse with Xamarin. Forms UI development using shared code base and logic. This
saves a lot of time and resources
3. Supports patterns like MVC and MVVM.
4. Xamarin Performance is close to Native apps.
5. Xamarin.Android supports Google Glass devices, Android Wear, and Firephone
6. Learning curve is relative. If your team knows C#, it is comparatively easy to get started with Xamarin
1. Hybrid web development support and code reusability to develop applications for Android, iOS,
Windows and web.
2. Fast development-testing cycle and no need for heavy emulator loading.
3. Allows to code in TypeScript and makes easy transition from AngularJS 2.
4. The same language (TypeScript) can be used to develop applications for every platform.
5. Its plugin system makes it available for you to use any kind of native functionalities of devices.
React
Native
Xamarin
Ionic/
Phonegap
CONS
1. The process of conversion of HTML code to native code can be buggy at times, and to fix the
problems, you need to understand Objective-C/Swift.
2. Originally created for iOS, so many components for the Android may require some work from your
side.
3. It’s harder to understand how it works comparing, for example, with Cordova. Front-end developer
should spend some time learning React Native to use it properly.
1. Does not provide access to certain Android specific UI controls.
2. Impacts load time as it has its own runtime
3. Xamarin is not supported to use open source libraries.
4. Xamarin apps occupies a few MB more than their native(iOS/android) apps.
1. Performance issues may occur if you need to use a lot of callbacks to the native code.
2. The same UI look in all the devices may be a deal breaker for those who prefer the native UI look.
3. Development of highly advanced graphics or highly interactive transitions can be a complex job.
React
Native
Xamarin
Ionic/
Phonegap
Top Users
React
Native
Xamarin
Ionic/
Phonegap
Comparison
Thank youCommunicate with us…
Mobio Solutions LLP
706/B, Ganesh Plaza, Navrangpura,
Ahmedabad - 380009, Gujarat, India
Phone: +91 79 65555706
Email: [email protected]
Web: www.mobiosolutions.com
Top Related