If you’re not a developer, but you keep hearing about ReactJS or React Native and need a quick primer, this is for you. What follows is a layman’s guide to a new software architecture that is fast gaining popularity. Simply put, this will demystify both ReactJS and React Native, while providing insight as to why it’s so flexible, powerful, and on the rise.
1. Client-Side Processing
This means that the code is executed on the user’s processor instead of the web server, saving bandwidth and server load.
2. Easy to Learn
The syntax of this language makes it easier for developers to learn.
3. Simple to Implement
Being able to use the same language on both front and back end makes things easier for development teams
5. User Experience
React was born in Facebook Ads Org, created by Jordan Walke, a software engineer at Facebook. It was first deployed on Facebook’s newsfeed in 2011 and later on Instagram in 2012.
React is a library, built around the concept of components. Essentially, React provides a template language and some function hooks to render HTML. And because React is just for views (React is often described as the “V” in the “MVC structure”) the state and the logic needs to come from somewhere else. React does not necessarily prescribe a data management system, but libraries like Redux and MobX have become very popular in the React community for solving this requirement.
Why was React created?
You might wonder, if Angular, Backbone and Ember already have view layers (the V in MVC), and are complete MVCs themselves, why do we even need React? The problem is that MVC doesn’t scale well, and Facebook ran into this very problem. Their own increasingly complex codebase was becoming fragile and unpredictable and before they knew it, developers were afraid to make changes because of it. Essentially, React and Flux (the original tool that Redux was inspired by) were created because MVC was becoming unwieldy. Redux’s unilateral data flow prevents your application from accidentally entering into infinite loops and producing unexpected results. Facebook created React as a way to solve their own codebase complexity, while offering it open source to the world.
React Native uses the same design as React, but instead of wrapping the DOM, React is wrapping native mobile device components, letting you compose a mobile UI from declarative (i.e. easy to modify) components.
The reasons why you would want to develop a native application over an HTML5 app or hybrid app are for things like: offline capabilities, hardware functionality, sophisticated gesture handling and smooth animations. Though some of those things were possible through the browser, they didn’t feel the same. The reality is that the Native environment is far more powerful and flexible than anything we can reproduce in the browser environment today.
But, that power and flexibility comes at a cost. The native environment is also more hostile to developers and organizations. This is because you need two sets of knowledge—one for iOS and one for Android—and specific platform code and teams. It’s not easy to reuse anything, share or move between teams.
React Native doesn’t promise to create a write once, run anywhere product. Concerns for iOS and Android will be different and their user experiences should be considered carefully on an individual basis. React Native does promise to provide a ‘learn once, write anywhere’ possibility for development teams. The drive behind it is that engineers should be able to use the same tools to build different products—and now they can.
Who is using React Native?
Currently, Facebook (obviously.), Instagram, Airbnb, Tesla, Walmart, SoundCloud and more. See who else is using React Native.
Latest posts by Lesley Anderson (see all)
- From Idea to Prototype in 6 Easy Steps - June 13, 2017
- The Future of UI - February 9, 2017