PDF Learning React Native Building Native Mobile Apps with JavaScript 1 (Early Release) Edition Bonnie Eisenman download
PDF Learning React Native Building Native Mobile Apps with JavaScript 1 (Early Release) Edition Bonnie Eisenman download
com
https://ebookname.com/product/learning-react-native-
building-native-mobile-apps-with-javascript-1-early-release-
edition-bonnie-eisenman/
OR CLICK HERE
DOWLOAD NOW
https://ebookname.com/product/enyo-up-and-running-build-native-
quality-cross-platform-javascript-apps-2nd-edition-roy-sutton/
ebookname.com
https://ebookname.com/product/building-android-apps-with-html-css-and-
javascript-2nd-edition-jonathan-stark/
ebookname.com
https://ebookname.com/product/basic-betacam-camerawork-third-edition-
media-manuals-media-manuals-peter-ward/
ebookname.com
https://ebookname.com/product/women-in-the-arts-eccentric-essays-
ii-1st-edition-barbara-harbach/
ebookname.com
https://ebookname.com/product/dreaming-again-on-things-already-
dreamed-500-years-of-orlando-furioso-1516-2016-marco-dorigatti-editor/
ebookname.com
https://ebookname.com/product/instructor-s-solution-manuals-to-
physics-principles-with-applications-7th-edition-douglas-c-giancoli/
ebookname.com
https://ebookname.com/product/cognitive-english-grammar-cognitive-
linguistics-in-practice-2nd-edition-gunter-radden/
ebookname.com
Regulated cell death Part A apoptotic mechanisms 1st
Edition Avi Ashkenazi
https://ebookname.com/product/regulated-cell-death-part-a-apoptotic-
mechanisms-1st-edition-avi-ashkenazi/
ebookname.com
Learning React Native
Building Mobile Applications with Javascript
Bonnie Eisenman
Boston
{{ title }}
by Author Name
Copyright © 2015
This is a legal notice of some kind. You can add notes about the kind of license you are using for your
book (e.g., Creative Commons), or anything else you feel you need to specify.
If your book has an ISBN or a book ID number, add it here as well.
Table of Contents
1. Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
How Does React Native Work? 10
The Virtual DOM in React 10
Extending the Virtual DOM 11
The Implications of “Native” 12
Why Use React Native? 13
Learn once, write anywhere 13
Leveraging the native platform 14
Developer tools 14
Using existing platform knowledge 16
Risks and Drawbacks 16
Summary 17
Native VS React for Web 17
The React Native Lifecycle 17
Working with Views in React Native 18
Styling Native Views 20
JSX and React Native 21
Thinking about host platform APIs 21
Summary 22
2. Getting Started. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Setting Up Your Environment 23
Installing React Native 24
Creating a New Application 24
Running a React Native Application 25
Uploading to Your Device 27
iii
Summary 30
Exploring the Sample Code 30
Attaching a component to the view 31
Imports in React Native 31
The FirstProject Component 32
Summary 32
Introduction to the Tools 32
Using the Chrome Debugger 33
Targeting Different Devices 33
Type-Checking with Flow 34
Testing with Jest 34
Summary 35
Building a Weather App 36
Handling User Input 38
Displaying Data 39
Adding a Background Image 40
Fetching Data from the Web 42
Putting it Together 43
Summary 46
4. Styles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Declaring and Manipulating Styles 85
Inline Styles 86
Styling with Objects 86
Using Stylesheet.Create 87
Style Concatenation 87
Organization and Inheritance 89
Exporting Style Objects 89
iv | Table of Contents
Passing Styles as Props 90
Reusing and Sharing Styles 91
Positioning and Designing Layouts 91
Layouts with Flexbox 91
Using Absolute Positioning 97
Putting it Together 98
Summary 102
Table of Contents | v
Preface Title
This Is an A-Head
Congratulations on starting your new project! We’ve added some skeleton files for
you, to help you get started, but you can delete any or all of them, as you like. In the
file called chapter.html, we’ve added some placeholder content showing you how to
markup and use some basic book elements, like notes, sidebars, and figures.
vii
CHAPTER 1
Introduction
9
How Does React Native Work?
The idea of writing mobile applications in Javascript feels a little odd. How is it possi‐
ble to use React in a mobile environment? In this section, we will explore the techni‐
cal underpinnings that enable React Native. We will first need to recall one of React’s
features, the Virtual DOM, and understand how it relates to React Native for mobile.
In the context of React on the web, most developers think of the Virtual DOM pri‐
marily as a performance optimization. Indeed, the Virtual DOM was one of React’s
early claims to fame, and most articles discussing React’s benefits mention perfor‐
mance and the Virtual DOM in the same breath. This focus makes a lot of sense,
given the context. At the time of React’s release, the Virtual DOM approach to ren‐
dering gave it a large performance advantage over existing Javascript frameworks,
especially when dealing with changing data or otherwise render-intensive applica‐
tions. (Since then, React’s model for DOM updates has started to be adopted by other
10 | Chapter 1: Introduction
frameworks, such as Ember.js’s new Glitter engine, though React maintains a strong
lead when it comes to performance.)
12 | Chapter 1: Introduction
and any given host platform can add support for other platforms as well, so it will be
interesting to see where Native expands to next.
For developers accustomed to working on the web with React, this means that you
can write mobile apps with the performance and look-and-feel of a native application,
while using the tools that you know and love. This in turn has huge implications for
how we think about cross-platform application development, prototyping, and code
reuse.
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookname.com