By the end of May, React had it's 5th birthday, so it's a good time to write a post about introduction to React and React Native world.
React was created by** Jordan Walke**, a software engineer at Facebook’s newsfeed in 2011 and open-sourced at JSConf US in May 2013.
React is a JavaScript library for building user interfaces in adeclarative,component-based wayusing a specific type ofXML-like syntax which is called JSX - mix of HTML and JavaScript. What does actually declarative and component-based mean?
Declarative:
Component-Based:
Was announced at Facebook's React.js Conf in February 2015 and open-sourced in March 2015enables writing native Android and iOS applicationswithJavaScriptandReact. It has the same way of building applications, but uses different components.
WithReact Native, you can build a real mobile app - you don’t build a “mobile web app”, “HTML5 app” , or a “hybrid app”. This app is inindistinguishablefrom an app build withSwift,Objective-C orJava. React Native uses the same fundamental UI building blocks as regular iOS and Android apps meaning that:
Special advantage for Native Developers:
React Native combines smoothly with components written in Objective-C, Java, or Swift. It's simple to drop down to native code if you need to optimize a few aspects of your application. It's also easy to build part of your app in React Native, and part of >your app using native code directly.
React Native lets you build your app faster. Instead of recompiling, you can reload your app instantly thanks to Hot Reloading.
The idea behindhot reloadingis to keep the app running and to inject new versions of the files that you edited at runtime and while writing code you can even run new code while retaining your application state.
How exactly does React Native work under the hood ?
There are two important threads running in each React Native application. One of them is theMain Thread, which also runs in each standard native app. It handles displaying the elements of the user interface and processes user gestures. The other one is specific to React Native. Its task is to execute the JavaScript code in a separate JavaScript engine -JS Thread.
The JavaScript deals with the business logic of the application. It also defines the structure and the functionalities of the user interface. These two threads never communicate directly and never block each other. How do threads interact? Between these two threads is the so-calledbridge, which is the core of React Native.
React Native is becoming more and more popular. From the business perspective, the reason is obvious - why I should hire2 teamsof developers for building the same application twice, forAndroidandiOS, when I can hire1 teamthat will do both inthe same time?
Taking into account that the most of the new ideas for apps areCRUD’s (Create, Read, Update, Delete) that connects with theAPIwhich React Native is perfect for, there’s no other way to go. What’s best way to buildMVP? It should be done as quick and as cost-effective as possible, because as a business owner you want to test your idea before spending all the investors money for it.
Whether you're an Investor, Software House owner, you dream about creating a start-up or a developer interested in trying new area of programming, here's a list of things which will help you decide why you shouldn't ignore React Native:
July 02, 2018