You are previewing Learning React.
O'Reilly logo
Learning React

Book Description

Interested in React but find yourself confused about how to use it with the Flux architecture? This is your book. Authors Alex Banks and Eve Porcello show you how to build React applications with the entire React ecosystem—including Flux. You’ll learn about the methodologies behind the creation of the library and its related tools through short interviews with key players in the React community.

Table of Contents

  1. 1. Welcome to React
    1. History
    2. React is not a Framework
      1. React and MVC
    3. React Ecosystem
    4. Keeping up with the Changes
    5. Working with the Files
      1. File Repository
      2. React Developer Tools 
      3. Installing Node.js
  2. 2. Emerging JavaScript
    1. Declaring Variables in ES6
      1. Const
      2. Let
      3. Template Strings
      4. Default Parameters
    2. Arrow Functions
    3. Transpiling ES6
    4. ES6 Objects and Arrays
      1. Destructuring Assignment
      2. Object Literal Enhancement
      3. Spread Operator
    5. Promises
    6. Classes
    7. ES6 Modules
  3. 3. Functional Programming with JavaScript
    1. What it means to be Functional
      1. Imperative vs Declarative
    2. Functional Concepts
      1. Immutability
      2. Pure Functions
      3. Data Transformations
      4. Higher Order Functions
      5. Recursion
      6. Composition
      7. Putting it all together
  4. 4. Pure React
    1. Page Setup
    2. The Virtual DOM
    3. React Elements
    4. ReactDOM
    5. Children
    6. Constructing Elements with Data
    7. React Components
      1. React.createClass()
      2. React.Component
      3. Stateless Functional Components
    8. DOM Rendering
    9. Factories
  5. 5. React with JSX
    1. React Elements as JSX
      1. JSX Tips
    2. Babel
    3. Recipes as JSX
    4. Babel Presets
    5. Intro to webpack
      1. webpack Loaders
      2. Recipes App with a webpack Build
  6. 6. Props, State, and the Component Tree
    1. Property Validation
      1. Validating Props with createClass
      2. Default Props
      3. Custom Property Validation
      4. ES6 Classes and Stateless Functional Components
    2. Refs
      1. Inverse Data Flow
      2. Refs in Stateless Functional Components
    3. React State Management
      1. Introducing Component State
      2. Initializing State from Properties
    4. State within the Component Tree
      1. Color Organizer App Overview
      2. Passing properties down the component tree
      3. Passing data back up the component tree
  7. 7. Enhancing Components
    1. Component Lifecycles
      1. Mounting Lifecycle
      2. Updating Lifecycle
      3. The Updating Lifecycle Methods
      4. React Children
    2. JavaScript Library Integration
      1. Making Requests with Fetch
      2. Incorporating a D3 Timeline
    3. Higher-Order Components
    4. Managing State Outside Of React
      1. Rendering a Clock
    5. Flux
      1. Views
      2. Actions & Action Creators
      3. Dispatcher
      4. Stores
      5. Putting it all together
  8. 8. Redux
    1. State
    2. Actions
      1. Action Payload Data
    3. Reducers
      1. The Color Reducer
      2. The Colors Reducer
      3. The Sort Reducer
    4. The Store
      1. Subscribing to Stores
      2. Saving to localStorage
    5. Action Creators
    6. Middleware
      1. Applying middleware to the store
  9. 9. React Redux
    1. Explicitly Passing the Store
    2. Passing the Store via Context
    3. Presentational vs. Container Components
    4. React Redux Provider
    5. React Redux Connect