We’ll start with the basics, and work our way up to deploying a full-fledged application to both the iOS App Store and the Google Play Store, with 100% code reuse between the two platforms. In addition to the essentials of the framework, we’ll discuss how to work beyond it, including how to make use of third-party libraries and even how to write your own Java or Objective-C libraries to extend React Native.If you’re coming to mobile development from the perspective of a frontend software engineer or web developer, this is the course for you. React Native is a pretty amazing thing, and I hope you’re as excited to explore it.
This course is not an introduction to React, in general. We’ll assume that you have some working knowledge of React. If you’re brand new to React, we suggest reading through a tutorial or two before coming back to take the plunge into mobile development. Specifically, you should be familiar with the role of props and state, the component lifecycle, and how to create React components.
Chapter1. What Is React Native?
Chapter 2. Working with React Native
In this chapter, we’ll cover the “bridge,” and review how React Native works under the hood. Then, we’ll look at how React Native components differ from their web counterparts, and cover what you’ll need to know in order to create and style components for mobile.
Chapter 3. Building Your First Application
In this chapter, we will cover how to set up your local development environment for working with React Native. Then, we will go through the basics of creating a simple application, which you will then be able to deploy to your own iOS or Android device.
Chapter 4. Components for Mobile
In this chapter, we will take a closer look at the mobile-based components used for React Native, and how they compare to basic HTML elements. Mobile interfaces are based on different primitive UI elements than web pages, and thus we need to use different components.
Chapter 5. Styles
It’s great to be able to build functional applications, but if you can’t style them effectively, you won’t get very far! In Chapter 3, we built a simple weather application with some basic styles. While this gave us an overview of how to style React Native components, we glossed over many of the details. In this chapter, we will take a closer look at how styles work in React Native. We’ll cover how to create and manage your stylesheets, as well as the details of React Native’s implementation of CSS rules. By the end of this chapter, you should feel comfortable creating and styling your own React Native components and applications.
Chapter 6. Platform APIs
This chapter covers some of the available platform APIs. For our example, we’ll make some modifications to the Weather application from earlier. We’ll add geolocation to the app, so that it detects the user’s location automatically. We will also add “memory” to the app, so it will remember your previously searched locations. Finally, we’ll use the camera roll to change the background image to one of the user’s photos.
Chapter 7. Modules
Chapter 8. Debugging and Developer Tools
As you develop your own applications, chances are that something will go wrong along the way. When it’s time to debug your applications, we happily have some React Native specific tools that will make the job easier. There are also some nasty bugs that can crop up at the intersection of React Native and its host platform, which we’ll take a look at, too. In this chapter, we’ll dig into common pitfalls of React Native development, and the tools you can use to tackle them. And because any discussion of debugging would be incomplete without reference to testing, we’ll also cover the basics of getting automated testing set up for your React Native code.
Chapter 9. Putting It All Together
Now that we’ve covered many of the pieces you’ll need to build your own React Native applications, let’s put everything together. Up until now, we’ve mostly dealt with small examples. In this chapter, we’ll look at the structure of a larger application. We’ll cover the use of Reflux, a library for unidirectional dataflow based on the Flux model. We’ll also see how we can use the Dimensions API to scale text to accommodate different screen sizes. Finally, we’ll end with some homework: tasks that you can undertake to see what it’s like to build out more features in an existing React Native codebase.
Chapter 10. Deploying to the iOS App Store
Now that you have a totally awesome application, you’ll want to get it into the hands of your users. This process will vary by platform. In this chapter, we will focus on the detailed steps for uploading an application to the iOS App Store.