React in Action
Mark Tielens Thomas
  • MEAP began October 2016
  • Publication in November 2017 (estimated)
  • ISBN 9781617293856
  • 300 pages (estimated)
  • printed in black & white

React is an open source JavaScript framework that lets you quickly create user interfaces for web applications. This highly-performant tool implements a one-way data flow model, which means communication is much more top-down than side-to- side. It also utilizes a component-focused design, so you can build large, robust web applications that scale well with users and developers. Reasoning about an interface or application written with React ends up being much easier because it decreases overall complexity for developers working with it. Large and small companies alike are using React for highly-visible, high-impact applications including,, and

"An up-to-date and very comprehensive book on React, not only limited to React itself but also discusses how it can be integrated with other tools and frameworks."

~ Bachir Chihani, Software Engineer, DDN Storage

"This book really motors into some serious React concepts and fires you headlong into the React cannon."

~ Peter Sellars, Continuous Delivery/DevOps Consultant, Hypr NZ

"One of the clearer explanations of React I've seen."

~ Ryan Burrows, Software Developer, Rooster Park Consulting

Table of Contents detailed table of contents

Part 1: Meet React

1. Meet React

1.1. Meet React

1.1.1. Who this book is for

1.1.2. Who uses React?

1.2. Thinking in React: simple programming matters

1.3. What does React not do?

1.3.1. Knowing your (tools') limits

1.3.2. Buying the car

1.3.3. To framework or to library?

1.4. The Virtual DOM

1.4.1. The DOM

1.4.2. The Virtual DOM

1.4.3. Updates & diffing

1.4.4. Virtual DOM: just about speed?

1.5. Components: The fundamental unit of React

1.5.1. Components in General

1.5.2. Components in React: Encapsulated and Reusable

1.6. React for Teams

1.7. Summary

2. <Hello World />: our first component

2.1. Introducing React components

2.1.1. Thinking with Components

2.1.2. Understanding the application data

2.1.3. Multiple Components: composition & parent-child relationships

2.1.4. Establishing component relationships

2.2. Creating components in React

2.2.1. Creating ReactElements

2.2.2. Rendering Our First Component

2.2.3. Creating ReactClasses

2.2.4. The Render Method

2.2.5. Property validation via PropTypes

2.3. The life and times of a component

2.3.1. A React state of mind

2.3.2. Setting initial state

2.4. Meet JSX

2.4.1. Creating Components Using JSX

2.4.2. Benefits of JSX & Differences from HTML

2.5. Summary

Part 2: Components & Data in React

3. Data and data flow in React

3.1. Introducing state

3.1.1. What is state?

3.1.2. Mutable and immutable state

3.2. State in React

3.2.1. Mutable state in React: component state

3.2.2. Immutable state in React: props

3.2.3. Working with Props: PropTypes and default props

3.2.4. Stateless functional components

3.3. Component Communication

3.4. One-way data flow

3.5. Summary

4. Rendering & lifecycle methods in React

4.1. The render process and lifecycle methods

4.1.1. Introducing lifecycle methods

4.1.2. Types of lifecycle methods

4.1.3. Initial & "will" methods

4.1.4. Mounting components

4.1.5. Updating methods

4.1.6. Unmounting methods

4.2. Creating Letters Social

4.2.1. Creating components using ES6 classes

4.2.2. Fetching data for our posts

4.2.3. Rendering posts

4.3. Summary

5. Working with forms in React

5.1. Project: Creating posts in Letters Social

5.1.1. Data requirements

5.1.2. Component overview& hierarchy

5.2. Forms in React

5.2.1. Getting started with forms

5.2.2. Form elements & events

5.2.3. Updating state in forms

5.2.4. Controlled & uncontrolled components

5.2.5. Form validation and sanitization

5.3. Creating new posts

5.4. Answers to exercises

5.5. Summary

6. Routing in React

6.1. What is routing?

6.1.1. Routing in modern front-end web applications

6.2. Creating a router

6.2.1. Component routing

6.2.2. Creating the <Route /> component

6.2.3. Starting to build the <Router/> component

6.2.4. Matching URL paths and parameterized routing

6.2.5. Adding routes to the Router component

6.3. Using the router

6.3.1. Creating a <Post/> container component

6.3.3. Creating a <NotFound/> component

6.4. Integrating Firebase

6.4.1. Ensuring a user is logged in

6.5. Summary

7. Testing React components

7.1. What is testing?

7.1.1. Types of testing

7.1.2. Why test?

7.2. Testing React components with Jest, Enzyme, and Sinon

7.2.1. Testing tools

7.3. Writing our first tests

7.3.1. Testing a stateless functional component

7.3.2. Testing the CreatePost component

7.3.3. Test coverage

7.4. Summary

Part 3: React Applications

8. Redux application architecture

8.1. Introducing Redux

8.1.1. Meet Redux

8.1.2. Getting set up for Redux

8.2. Actions

8.2.1. Defining action types

8.2.2. Creating actions and changing state

8.2.3. Creating the Redux store and dispatching actions

8.2.4. Asynchronous actions and middleware

8.2.5. Testing Actions

8.2.6. Redux middleware

8.3. Reducers

8.3.1. State shape and initial state

8.3.2. Setting up reducers

8.3.3. Combining reducers

8.3.4. Testing reducers

8.4. React & Redux

8.4.1. Containers vs. Presentational components

8.4.2. Using <Provider />

8.4.3. Mapping state to props

8.4.4. Binding actions

8.4.5. Updating our tests

8.5. Summary

9. React on the server

9.1. Introducing React on the Server

9.1.1. You might not need SSR

9.1.2. Benefits of server-side rendering

9.1.3. Open-source SSR tools

9.1.4. Using React DOM

9.2. Rendering Components on the server

9.3. Switching to React Router

9.3.1. Setting up React router

9.4. Handling authenticated routes with React router

9.4.1. Recap

9.4.2. Considering frameworks & libraries for server-side rendering

9.5. Summary

10. React Native

10.1. Introducing React Native

10.2. React and React Native

10.3. When to use React Native

10.4. Where to go next

10.5. Summary

About the book

React in Action introduces front-end developers to the React framework and related tools. This clearly written, example-rich book begins by introducing you to React, diving into some of the fundamental ideas in React, and working with components. You'll work your way from "raw" React (no transpilation, no syntactic helpers) towards JSX, and from basic static components to ones that are dynamic and interactive. In the second section, you'll explore the different ways that data works in React as well as learning more about components. You'll discover core topics like lifecycle methods, data flow, forms, higher-order components, and testing. In the last section, you'll explore React application architecture with Redux, server-side rendering, and even dabble in React Native. You'll also find several useful appendices covering related topics like React tooling and ecosystem.

What's inside

  • Building a simple social networking sample app (Letters Social)
  • Learning about the fundamentals of React
  • Dynamically fetching data from a remote JSON API
  • Building React applications with modern JavaScript (ES6 and beyond)
  • Implementing a routing system from scratch using components
  • Utilizing server-side rendering for React applications
  • Testing React applications
  • Implementing application architecture using Redux

About the reader

Written for developers familiar with HTML, CSS, and JavaScript who want to create more robust front-end applications.

About the author

Mark Thomas is a full-stack web developer working mainly in JavaScript and Node.js. He loves clean code, fast APIs, and good coffee.

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.
MEAP combo $44.99 pBook + eBook + liveBook
MEAP eBook $35.99 pdf + ePub + kindle + liveBook

FREE domestic shipping on three or more pBooks