O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Developing a React Edge, 2nd Edition

Book Description

The entire book has been updated for React 0.14 and uses the latest version of JavaScript, ES6 (or ES2015). With this edition, readers get an expanded discussions of data flow, specifically around Flux, as well as discussions of using immutability with React, specifically around Immutable.js, and also the seamlessimmutable library. Throughout the book we reference bits of our example application, a reddit clone. Readers can read the full source code at http://git.io/vlcpa and view an online demo at http://git.io/vlCUI. This book also takes readers through four main topic areas to help them develop an edge with React: creating and composing components, tooling, working with React, and advanced topics including DOM manipulations, animations, performance tuning, and more. This book will enable readers to navigate all of these concepts and help you understand why they are beneficial and can help you build scalable Single Page Applications (SPAs).

Table of Contents

  1. Preface
    1. What is React and why should you use it?
    2. How this book helps
    3. What do you need to know prior to reading the book?
    4. Source code and sample application
    5. The writing process
    6. Authors
  2. 1. Introduction to React
    1. Background
    2. Book overview
  3. 2. JSX
    1. What is JSX?
    2. Benefits of JSX
    3. Composite components
    4. How is JSX different than HTML?
    5. Non-DOM attributes
    6. React without JSX
    7. The official JSX spec
  4. 3. Component lifecycle
    1. Lifecycle methods
    2. Instantiation
    3. Lifetime
    4. Teardown & cleanup
    5. Anti pattern: Calculated values as state
    6. Summary
  5. 4. Data flow
    1. Props
    2. PropTypes
    3. defaultProps
    4. State
    5. What belongs in state and what belongs in props?
    6. Stateless Functional Components
    7. Summary
  6. 5. Event handling
    1. Attaching event handlers
    2. Events and state
      1. State isn’t updating!
    3. Event objects
    4. Summary
  7. 6. Composing components
    1. Extending HTML
    2. Composition by example
    3. Parent / child relationship
    4. Wrap up
  8. 7. High Order Components and Mixins
    1. Simple Example
    2. Tips and Tricks
    3. Summary
  9. 8. DOM manipulation
    1. Accessing managed DOM nodes
    2. Finding DOM Nodes by Component
    3. Incorporating non-React libraries
    4. Overreaching plugins
    5. Summary
  10. 9. Forms
    1. Uncontrolled components
    2. Controlled components
    3. Form events
    4. Label
    5. Textarea and Select
    6. Checkbox and radio
    7. Multiple form elements and change handlers
    8. Custom form components
    9. Focus
    10. Usability
    11. Summary
  11. 10. Animations
    1. CSS Transition Groups
    2. Transition Group pitfalls
    3. Interval rendering
    4. Summary
      1. Spring Animation
  12. 11. Performance tuning
    1. shouldComponentUpdate
    2. Key
    3. Summary
  13. 12. Server side rendering 
    1. Render functions
    2. Summary
  14. 13. Development tools
    1. Build tools
    2. Browserify
    3. Add some React content
    4. Webpack 
    5. Debugging tools
    6. Starting out
    7. Summary
  15. 14. Testing
    1. Getting started
    2. Unit Testing React Components with Jest and Enzyme
    3. Summary
  16. 15. Architectural patterns
    1. Routing
    2. Flux
      1. Reflux
      2. Redux
      3. Relay
      4. Om and Om Next (ClojureScript)
    3. Summary
  17. 16. Immutability
    1. Performance Benefits
    2. Performance Costs
    3. Architectural Benefits
    4. Using the Immutability Helpers Addon
    5. Using seamless-immutable
    6. Using Immutable.js
    7. Summary
  18. 17. Other uses
    1. Desktop
    2. Games
    3. Email
    4. Charting
    5. Summary