Book Image

React Native - Building Mobile Apps with JavaScript

By : Vladimir Novick
Book Image

React Native - Building Mobile Apps with JavaScript

By: Vladimir Novick

Overview of this book

<p>The emergence of React Native has made creating mobile apps in JavaScript easier for developers. This book introduces you to the React Native framework and the mobile apps development process. It starts with how React Native fits into the world of hybrid apps, and why it’s a popular framework. You’ll learn how React Native works under the hood--compiling JavaScript to Native code to bridge JavaScript and native apps. Also, you’ll learn how to write React Native components and use the ReactJS way of structuring your app. Understand how to use the industry standard Redux architecture as well as MobX--a newly emerging approach for state management--making your apps more robust and scalable.</p> <p>The mobile native world can be intimidating, with lots of platform-specific APIs. In this book, you’ll learn about the most important APIs with help of the real-world examples. You’ll also learn about the community packages that can help speed up your development. The book explains how to use these packages with JavaScript code, include native modules in your application, and write the modules yourself. Throughout the book, you will see examples of WhatsApp, Instagram, and YouTube apps and learn how to recreate them. You’ll also learn debugging and testing techniques, authentication, dealing with real data, and much more.</p> <p>At the end we will walk through design to production process of Twitter app clone and will explain application release process to App Store and Play Store</p>
Table of Contents (13 chapters)

What this book covers

Chapter 1, Understanding Why React Native is the Future of Mobile Apps, introduces React Native as to the JavaScript framework for building native mobile apps. It describes the advantages of writing apps in React Native as well as how React Native works under the hood.

Chapter 2, Working with React Native, teaches the reader the basic building blocks of React Native. It covers how to set up your environment and create basic layouts for iOS and Android. Readers will get familiar with JSX syntax and Stateful and Presentational components, and will get a taste of creating a basic one-screen app and running it in an emulator.

Chapter 3, Getting Familiar with React Native Components, goes through all the components React Native supplies to us. This chapter will cover the components that can be reused across both Android and iOS as well as platform-specific components.

Chapter 4, Debugging and Testing React Native, explores debugging and testing React Native components. It will cover basic debugging techniques to debug your application while it's running, and it will explain how to write basic unit tests for your app.

Chapter 5, Bringing the Power of Flexbox to the Native World, informs the reader of the concept of flexbox styling and how it's applied to styling React Native apps. It covers the differences between styling with flexbox inside a browser and in a React Native environment.

Chapter 6, Animating React Native Components, focuses on animating UI components with APIs supplied by React Native. It will start with simple layout animations and will dive into more complex animation examples used in real apps.

Chapter 7, Authenticating Your App and Fetching Data, outlines how to fetch data from a remote server and post data to it. Readers won't have to set up their own server, but will get familiar with Firebase as a solution to "server as a service" architecture. Readers will learn how to retrieve and post data to Firebase as well as how to authenticate against Firebase. They will also learn how to authenticate an app with popular social networks.

Chapter 8, Implementing a Flux Architecture with Redux or MobX, dives into the flux architecture pattern and will dive deeper into Redux, the functional state management library, and flux architecture implementation, which is an industry standard nowadays. The chapter will cover the building blocks of Redux and will guide the readers through the process of connecting Redux to their React Native application and managing their application state with it. It will also explore an alternative library for state management--MobX as a functional reactive way to deal with state management.

Chapter 9, Understanding Supported APIs and How to Use Them, teaches that it's important to understand which core APIs are supported in React Native. This chapter will cover most native APIs, such as various notification, informational, and image-related APIs. Readers will learn how to retrieve photos from camera roll, get geolocation, and respond to gestures. At the end of the chapter, readers will build a Tinder App card, swiping behavior with complex animations and the PanResponder API.

Chapter 10, Working with External Modules in React Native, focuses on lots of community packages that are considered standard and make React Native app development much faster. It will dive deeper into navigation with the react-navigation package and will explain how it can be integrated both with Redux and MobX; then, it will list famous open source packages that will speed up your development, enhance mobile API coverage, and enrich your application with prebuilt animations and interactions. Then, it will cover how you start writing your own native modules and connect them to the React Native world. Finally, it will discuss integration between existing native apps and React Native.

Chapter 11, Understanding the Application Development Workflow by Recreating Twitter, presents a real-world application, Twitter, and will discuss how to create this application from scratch. It will follow all the techniques the book has taught to summarize the process of creating a fully functional production app.

Chapter 12, Deploying Your App to App Store or Google Play, shows that deploying your application to either App Store or Play Market can be a challenge for web developers who are not familiar with this process. The chapter will cover deploying iOS and Android apps and using instant deployment services to make your deployment even better than that of native apps.