Book Image

React Projects

By : Roy Derks
Book Image

React Projects

By: Roy Derks

Overview of this book

Developed by Facebook, React is a popular library for building impressive user interfaces. React extends its capabilities to the mobile platform using the React Native framework and integrates with popular web and mobile tools to build scalable applications. React Projects is your guide to learning React development by using modern development patterns and integrating React with powerful web tools such as GraphQL, Expo, and React 360. You'll start building a real-world project right from the first chapter and get hands on with developing scalable applications as you advance to building more complex projects. Throughout the book, you'll use the latest versions of React and React Native to explore features such as Higher Order Components (HOC), Context, and Hooks on multiple platforms, which will help you build full stack web and mobile applications efficiently. Finally, you'll delve into unit testing with Jest to build test-driven apps. By the end of this React book, you'll have developed the skills necessary to start building scalable React apps across web and mobile platforms.
Table of Contents (14 chapters)

To get the most out of this book

All the projects in this book are created with React, React Native, or React 360 and require you to have prior knowledge of JavaScript. Although all the concepts of React and related technologies are described in this book, we advise you to refer to React docs if you want to find out more about a feature. In the following section, you can find some information about setting up your machine for this book and how to download the code for each chapter.

Set up your machine

For the applications that are created in this book, you'll need to have at least Node.js v10.16.3 installed on your machine so that you can run npm commands. If you haven't installed Node.js on your machine, please go to, where you can find the download instructions for macOS, Windows, and Linux.

After installing Node.js, run the following commands in your command line to check the installed versions:

  • For Node.js (should be v10.16.3 or higher):
node -v
  • For npm (should be v6.9.0 or higher):
npm -v

Also, you should have installed the React Developer Tools plugin (for Chrome and Firefox) and added it to your browser. This plugin can be installed from the Chrome Web Store ( or Firefox Addons (

Download the example code files

You can download the example code files for this book from your account at If you purchased this book elsewhere, you can visit and register to have the files emailed directly to you.

You can download the code files by following these steps:

  1. Log in or register at
  2. Select the Support tab.
  3. Click on Code Downloads.
  4. Enter the name of the book in the Search box and follow the onscreen instructions.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR/7-Zip for Windows
  • Zipeg/iZip/UnRarX for Mac
  • 7-Zip/PeaZip for Linux

The code bundle for the book is also hosted on GitHub at In case there's an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at Check them out!

Download the color images

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "Since you're going to build a Movie List application in this chapter, name this directory movieList."

A block of code is set as follows:

"name": "movieList",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"keywords": [],
"author": "",
"license": "ISC"

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

import React from 'react';
import ReactDOM from 'react-dom';
+ import List from './containers/List';

const App = () => {
- return <h1>movieList</h1>;
+ return <List />;

ReactDOM.render(<App />, document.getElementById('root'));

Any command-line input or output is written as follows:

npm init -y

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "When the user clicks the Close X button, the display styling rule of the component will be set to none."

Warnings or important notes appear like this.
Tips and tricks appear like this.