React Native in Action
Developing iOS and Android apps with JavaScript
Nader Dabit
  • MEAP began July 2016
  • Publication in August 2018 (estimated)
  • ISBN 9781617294051
  • 300 pages (estimated)
  • printed in black & white

Great introduction to the rapidly changing world of React and React Native!

Joseph Tingsanchali

React Native just may be the holy grail of cross-platform app development that many developers and companies have been hoping for. Using React Native, developers can build performant cross-platform native apps much easier than ever before, all with a single programming language: JavaScript. With the growing demand for apps and the increasing complexity that app development entails, React Native comes along at a perfect time. If you're serious about app development or want to stay ahead of the curve on emerging and disruptive technologies, take a look at React Native.

Table of Contents detailed table of contents

Part 1: Getting Started With React Native

1. Getting started with React Native

1.1. Introducing React and React Native

1.1.1. A Basic React Class

1.1.2. React Lifecycle

1.2. What You Will Learn

1.3. What You Should Know

1.4. Understanding how React Native works

1.4.1. JSX

1.4.2. Threading

1.4.3. React

1.4.4. Unidirectional data flow

1.4.5. Diffing

1.4.6. Thinking in components

1.5. Acknowledging the strengths

1.5.1. Developer availability

1.5.2. Developer productivity

1.5.3. Performance

1.5.4. One-way data flow

1.5.5. Developer experience

1.5.6. Transpilation

1.5.7. Productivity and efficiency

1.5.8. Community

1.5.9. Open source

1.5.10. Immediate updates

1.5.11. Other similar solutions

1.5.12. Drawbacks

1.5.13. Conclusion

1.6. Creating and using basic components

1.6.1. Components

1.6.2. Native components

1.6.3. Component composition

1.6.4. Exportable components

1.6.5. Combining components

1.7. Creating a starter project

1.7.1. Create React Native App CLI

1.7.2. React Native CLI

1.8. Summary

2. Understanding React

2.1. Managing component data using state

2.1.1. How to correctly manipulate component state

2.2. Managing component data using props

2.3. React Component Specifications

2.3.1. Using the render method to create your UI

2.3.2. Using property initializers and constructors

2.4. React Lifecycle Methods

2.4.1. Component mounting / creation

2.4.2. Component updating

2.4.3. Component unmounting

2.4.4. The static getDerivedStateFromProps method

2.4.5. The componentDidMount lifecycle method

2.4.6. The shouldComponentUpdate lifecycle method

2.4.7. The componentDidUpdate lifecycle method

2.4.8. The componentWillUnmount lifecycle method

2.5. Summary

3. Building Your First React Native App

3.1. Building a Todo app

3.1.1. Lay out the Todo app

3.1.2. Coding the Todo app

3.1.3. Opening Developer Menu in iOS Simulator

3.1.4. Opening the developer menu in Android Emulator

3.1.5. Using the Developer Menu

3.1.6. Continuing building the Todo app

3.2. Summary

Part 2: React Native Application Development

4. Introduction to styling

4.1. Styling Overview

4.1.1. Applying styles

4.1.2. Organizing styles

4.1.3. Styles are code

4.2. Styling View Components

4.2.1. backgroundColor

4.2.2. Border properties

4.2.3. Margin and Padding

4.2.4. Position

4.2.5. Profile Card positioning

4.3. Styling Text Components

4.3.1. Text components vs view components

4.3.2. Font Styles

4.3.3. Decorative text styles

4.4. Summary

5. Styling in depth

5.1. Platform-specific sizes and styles

5.1.1. Pixels, Points, and DPs

5.1.2. Creating drop shadows with ShadowPropTypesIOS and Elevation

5.1.3. Putting it into practice: drop shadows in the ProfileCard

5.2. Using transformations to move, rotate, scale and skew components

5.2.1. perspective

5.2.2. translateX and translateY

5.2.3. rotateX, rotateY, and rotateZ (roatet)

5.2.4. backfaceVisibility

5.2.5. scale, scaleX, and scaleY

5.2.6. Using the scale transform to create a thumbnail of the ProfileCard

5.2.7. skewX and skewY

5.2.8. Transformation key points

5.3. Using Flexbox to layout components

5.3.1. flex

5.3.2. flexDirection

5.3.3. justifyContent

5.3.4. alignItems

5.3.5. alignSelf

5.3.6. flexWrap

5.4. Summary

6. Building a Star Wars app using cross-platform components

6.1. Creating a new React Native app and installing dependencies

6.2. Importing the People component and creating the Container component

6.3. Creating the Navigation component and registering routes

6.4. Creating the main class for the initial view

6.5. Creating the People component using FlatList, Modal, and Picker

6.6. Creating the state and setting up a fetch call to retrieve data

6.7. Adding the remaining class methods

6.8. Render method of People.js

6.9. Creating the HomeWorld component

6.10. Creating the HomeWorld class and initializing state

6.11. Fetching data from the API using the url prop

6.12. Wrapping up the HomeWorld component

6.13. Summary

7. Navigation

7.1. React Native Navigation vs Web Navigation

7.2. Building a Navigation-based App

7.3. Persisting Data

7.4. DrawerNavigator

7.5. Summary

8. Implementing Cross—platform APIs

8.1. Implementing Cross Platform APIs

8.2. Using the Alert API to create cross platform notifications

8.2.1. Use Cases

8.2.2. Example

8.3. Using the AppState API to detect the current application state

8.3.1. Use Cases

8.3.2. Example

8.4. Using the AsyncStorage API to persist data

8.4.1. Use Cases

8.4.2. Example

8.5. Using the Clipboard API to copy text into the user’s clipboard

8.5.1. Use Cases

8.5.2. Example

8.6. Using the Dimensions API to get the user’s screen information

8.6.1. Use Cases

8.6.2. Example

8.7. Using the Geolocation API to get the user’s current location information

8.7.1. Use Cases

8.7.2. Example

8.8. Using the Keyboard API to control the location and functionality of the native keyboard

8.8.1. Use Cases

8.8.2. Example

8.9. Using NetInfo to get the user’s current online / offline status

8.9.1. Use Cases

8.9.2. Example

8.10. Using the PanResponder API to get information about touch and gesture events

8.10.1. Use Cases

8.10.2. Example

8.11. Summary

9. iOS-specific Components and APIs

9.1. Targeting platform-specific code

9.1.1. iOS and Android file extension

9.1.2. Detecting platform using the Platform API

9.2. DatePickerIOS

9.3. PickerIOS

9.3.1. Example

9.4. ProgressViewIOS

9.4.1. Use Cases

9.4.2. Example

9.5. SegmentedControlIOS

9.5.1. Use Cases

9.5.2. Example

9.6. TabBarIOS

9.6.1. Use Cases

9.6.2. Example

9.7. ActionSheetIOS

9.7.1. Use Cases

9.7.2. Example

9.8. Summary

10. Implementing Android-specific components and APIs

10.1. Creating the menu using DrawerLayoutAndroid

10.2. Creating a toolbar with ToolbarAndroid

10.3. Implementing scrollable paging with ViewPagerAndroid

10.4. Using the DatePickerAndroid API to show a native date picker

10.5. TimePickerAndroid

10.6. Implementing Android Toasts using ToastAndroid

10.7. Summary

11. Animations

11.1. Introducing the Animated API

11.2. Animating a form input to expand on focus

11.3. Creating a custom loading animation using interpolation

11.4. Creating multiple parallel animations

11.5. Animated Sequence

11.6. Animated Stagger

11.7. Other useful tips for using Animated library

11.7.1. Resetting an Animated value

11.7.2. Invoking a callback

11.7.3. Offloading animations to the native thread

11.7.4. Creating a custom animatable component using createAnimatedComponent

11.8. Summary

12. Data architecture

12.1. What is Redux?

12.2. Using context to create and manage global state in a React application

12.3. Implementing Redux with a React Native app

12.4. Creating Redux reducers to hold Redux state

12.5. Adding the Provider and creating the store

12.6. Accessing data using the connect function

12.7. Adding actions

12.8. Deleting items from a Redux store in a reducer

12.9. Summary

Appendixes

Appendix A: Installing and running React Native

A.1. Developing for iOS Devices

A.1.1. Getting Started

A.2. Developing for Android devices

A.2.1. Mac and Android

A.2.2. Windows and Android

A.2.3. Linux and Android

A.3. Creating a new project

A.4. Running the project

Appendix B: Resources

About the book

React Native in Action gives iOS, Android, and web developers the knowledge and confidence to begin building high quality iOS and Android apps using the React Native framework. You'll start by getting a clear understanding of what React Native is and how it works. Then you'll follow step-by-step instructions to build your first functional app while you learn the fundamentals. This clearly-written book dives into more complex application development topics like styling, cross-platform and OS specific components, APIs, network requests, and animations. In the last part of the book, you'll learn to develop data architectures and thoroughly test your apps. By the end, you'll know to build high quality, cross-platform mobile apps with React Native.

What's inside

  • Installing and running React Native
  • In-depth coverage of routing, Redux, and animations
  • Implementing React Native components and APIs
  • Requesting and sending data over the network
  • Storing and retrieving data locally
  • Managing data and state
  • Testing React Native code

About the reader

This book is for beginner to intermediate web, JavaScript, or iOS (Swift/Objective C) developers.

About the author

Nader Dabit has been developing with React Native since the framework's release and is active in the React Native community.

Manning Early Access Program (MEAP) Read chapters as they are written, get the finished eBook as soon as it’s ready, and receive the pBook long before it's in bookstores.
buy
MEAP combo $49.99 pBook + eBook + liveBook
React Native in Action (eBook) added to cart
continue shopping
go to cart

MEAP eBook $39.99 pdf + ePub + kindle + liveBook

FREE domestic shipping on three or more pBooks

A valuable reference once you start dealing with more sophisticated scenarios.

Jose San Leandro

A gentle introduction to React Native.

Zhuo Hong Wei