Effective React
$16.99
Minimum price
$19.99
Suggested price

Effective React

About the Book

React, which is built and maintained by a team of engineers at Facebook, is a JavaScript library that is primarily responsible for handling the "view" component of a JavaScript single-page application by rendering data-driven UIs in an efficient, dynamic, and visually appealing manner. It is flexible enough that it can be used in a diversity of capacities and contexts regardless of the technology stack you are using. Since its initial release in 2013, React has been very well received by the JavaScript community and its popularity has only been ever-increasing since. There are *many* positive aspects in terms of performance, scalability, and simplicity that React can provide to application development as it progresses along in both size and complexity when data changes over time. React will automatically manage all your UI updates when the underlying data changes... and it will do it fast! That’s one of the many things that developers like about it. Gone are the days where you had to worry about managing your own visual updates with jQuery! 

This book will teach you how to implement React into your own applications and will go from the basics of rendering simple sets of data and local variables all the way up to dynamic visualizations and integration with APIs. Common tools utilized within the React ecosystem -- such as Node.js, Grunt, Babel, and Browserify -- are also covered in depth as well. There is also a chapter entirely dedicated to ECMAScript 6, the latest version of JavaScript, and how you can incorporate it into your React applications.

You don't want to miss out on learning all about this exciting new technology! This book will allow you to get up and running with React in an efficient and effective manner. Working code samples for each chapter covering the same topics written in the same style as the code within the book is also included!

  • Share this book

  • Categories

    • React
    • JavaScript
    • Software
    • Computers and Programming
    • Node.js
  • Feedback

    Email the Author(s)

About the Author

Ian Chursky
Ian Chursky

Should I write in the 3rd person here? Ian Chursky (that's me) is a Seattle-area developer who has been working in the development world since interning as a web developer during the dotcom bubble days of early 2000 before attending college at Seattle University, graduating with a degree in Biology and minoring in Computer Science. After college he has worked at both giant, evil, multinational corporations and small creative dev shops and everything in-between. Professionally, he spends a lot of time in JavaScript (React, TypeScript, Vue.js, Knockout.js, Node.js Express.js) and in the Microsoft stack of technologies (ASP.NET/C#, .NET WebAPI, Azure, etc.) but has also been called upon to venture into the worlds PHP, Python, and Java. He lives in the general greater Seattle area with his wife and 2 daughters.

Table of Contents

Preface

History

What is React?

Who This Book Is For

Required Tools

Node.js

Command Line Shell/Terminal

Local Web Server

JSX Compilation with Babel & Browserify

Task Runners / Module Bundlers

ECMAScript 6

Errata

Work in Progress

Feedback

Chapter 1: Getting Started With React

Setting Up: Local Web Server, Task Runners & JSX Transpiler

An ECMAScript 6 Primer

Class Syntax

Module Loading

"Hello World" in React

Properties & Displaying Data With this.props

Configuring webpack to Watch Our Files for Changes

Configuring webpack to Minify JavaScript

Using webpack as a Web Server

Summary

Chapter 2: To Do: Create Your First React Application

Setting Up

Writing a "To Do" Application

Component Composition

Properties With this.props

Handling Events & State

Binding Context

Adding "To Do" Items & Handling User Input

Improving Our Code

Validation

Removing "To Do" Items & Passing Click Events From Child Component to a Parent Component

Editing "To Do" Items

Conditionally Displaying Elements Within Components

CSS Styling & Polish in React

Summary

Chapter 3: Styling React Components

Philosophy of React Styling

Styling Our "To Do" Application

Initial Styling

Combining Multiple Styles

Animation

Summary

Chapter 4: API Integration With React

What is an API?

Creating a REST API in Node.js

Integrating our API with React

Sending Data to the Server

React Component Lifecycle

Mounting - Creating & Adding Components

Unmounting - Deleting & Removing Components

Initial Component Prop Values & Component State Changes

Summary

Chapter 5: React Router

JavaScript Routing at a Glance

Setting Up the Project

Implementing React Router

Adding Links

Nested Routes

Index Route

Active Links

Browser History

Summary

Chapter 6: Miscellaneous React Stuff

Globally Accessible Variables

Using the Global Namespace

Singleton Pattern / Exporting Class Instances

Using Event Channels in React

Summary

Chapter 7: State Management Libraries in React

Getting Started

Flux Application Structure

Components

Constants

Dispatcher

Actions

Stores

Putting it All Together

Redux

Setting Up

Integrating Redux Into Our Application

Store

Reducers

Actions

Provider

Connecting the Store, Actions & Reducers

Summary

Conclusion

Appendix A: Code Samples & Repos

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earnedover $14 millionwriting, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub