Аннотация
One of the major problems that teams face when writing native mobile applications is becoming familiar with all the different technologies. iOS and Android - the two dominant mobile platforms - support different languages. For iOS, Apple supports the languages Swift4 and Objective-C5. For Android, Google supports the languages Java6 and Kotlin7.
And the differences don’t end there. These platforms have different toolchains. And they have different interfaces for the device’s core functionality. Developers have to learn each platform’s procedure for things like accessing the camera or checking network connectivity.
One trend is to write mobile apps that are powered by WebViews. These types of apps have minimal native code. Instead, the interface is a web browser running an app written in HTML, CSS, and JS. This web app can use the native wrapper to access features on the device, like the camera roll.
Tools like Cordova8 enable developers to write these hybrid apps. The advantage is that developers can write apps that run on multiple platforms. Instead of learning iOS and Android specifics, they can use HTML, CSS, and JS to write a “universal” app.
The disadvantage, though, is that it’s hard to make these apps look and feel like real native applications. And users can tell.
While universal WebView-powered apps were built with the idea of build once, run anywhere, React Native was built with the goal of learn once, write anywhere.
React is a JavaScript framework for building rich, interactive web applications. With React Native, we can build native mobile applications for multiple platforms using JavaScript and React. Importantly, the interfaces we build are translated into native views. React Native apps are not composed of WebViews.
We’ll be able to share a lot of the code we write between iOS and Android. And React Native makes it easy to write code specific to each platform when the need arises. We get to use one language (JavaScript), one framework (React), one styling engine, and one toolchain to write apps for both platforms. Learn once, write anywhere.
At its core, React Native is composed of React components. We’ll dig deep into components throughout this book, but here’s an example of what a React component looks like:








Комментарии к книге "Fullstack React Native"