About This Book

This book is intended to cure the troubles of front-end developers, make their lives more meaningful and happier, and help them earn more money by introducing them to React.js—and doing so in a fast manner (hence the word Quickly in the title). It’s the work of one and a half years and about a dozen people. At the very least, the book is meant to open your mind to some unusual concepts like JSX, unidirectional data flow, and declarative programming.

Roadmap

The book is split into two parts: “Core React” (chapters 111) and “React and friends” (chapters 1220). Each chapter includes descriptive text supplemented with code examples and diagrams where they’re applicable. Each chapter also has an optional introductory video that will help you decide whether you need to read the chapter or can skip it. Chapters are written in a standalone manner, meaning you should have no trouble if you don’t read the book in order—although I do recommend reading it sequentially. At the end of each chapter is a quiz, to reinforce your retention of the material, and a summary.

Each part ends with a series of larger projects that will give you more experience with React and solidify your new understanding by building on the concepts and knowledge introduced in the previous chapters. The projects are supplemented by optional screencast videos to reinforce your learning and show you dynamic things like creating files and installing dependencies (there are a lot of moving parts in web development!). These projects are an integral part of the book’s flow—avoid skipping them. I encourage you to type each line of code yourself and abstain from copying and pasting. Studies have shown that typing and writing increase learning effectiveness.

The book ends with five appendixes that provide supplemental material. Check them out, along with the table of contents, before you begin reading.

The websites for this book are www.manning.com/books/react-quickly and http://reactquickly.co. If you need up-to-date information, most likely you’ll find it there.

The source code is available on the Manning website (www.manning.com/books/react-quickly) and on GitHub (https://github.com/azat-co/react-quickly). See the “Source code” section for more details. I show full listings of the code in the book—this is more convenient than jumping to GitHub or a code editor to look at the files.

Who this book is for (read this!)

This book is for web and mobile developers and software engineers with two to three years of experience, who want to start learning and using React.js for web or mobile development. Basically, it’s for people who know the shortcut for the Developer Tools by heart (Cmd-Opt-J or Cmd-Opt-I on Macs). The book targets readers who know and are on a first-name basis with these concepts:

  • Single-page applications (SPAs)
  • RESTful services and API architecture
  • JavaScript, especially closures, scopes, and string and array methods
  • HTML, HTML5, and their elements and attributes
  • CSS and its styles and JavaScript selectors

Having experience with jQuery, Angular, Ember.js, Backbone.js, or other MVC-like frameworks is a plus, because you’ll be able to contrast them with the React way. But it’s not necessary and to some degree may be detrimental, because you’ll need to unlearn certain patterns. React is not exactly MVC.

You’ll be using command-line tools, so if you’re afraid of them, this is the best time to fight your phobia of the command line/Terminal/command prompt. Typically, CLIs are more powerful and versatile than their visual (GUI) versions (for example, the Git command line versus the GitHub desktop—the latter confuses the heck out of me).

Having some familiarity with Node.js will allow you to learn React much more quickly than someone who’s never heard of Node.js, npm, Browserify, CommonJS, Gulp, or Express.js. I’ve authored several books on Node.js for those who want to brush up on it, the most popular being Practical Node.js (http://practicalnodebook.com). Or, you can go online for a free NodeSchool adventure (http://nodeschool.io) (free does not always mean worse).

What this book is not (read this too!)

This book is not a comprehensive guide to web or mobile development. I assume that you already know about those. If you want help with basic programming concepts or JavaScript fundamentals, there are plenty of good books on those topics. You Don’t Know JS by Kyle Simpson (free to read at https://github.com/getify/You-Dont-Know-JS), Secrets of the JavaScript Ninja, Second Edition (www.manning.com/books/secrets-of-the-javascript-ninja-second-edition), and Eloquent JavaScript by Marijn Haverbeke (free to read at http://eloquentjavascript.net) come to mind. So, there’s no need for me to duplicate existing content with this book.

How to use this book

First of all, you should read this book. That is not a joke. Most people buy books but never read them. It’s even easier to do so with digital copies, because they hide on drives and in the cloud. Read the book, and work through the projects, chapter by chapter.

Each chapter covers either a topic or a series of topics that build on each other. For this reason, I recommend that you read this book from beginning to end and then go back to individual chapters for reference. But as I said earlier, you can also read individual chapters out of order, because the projects in the chapters stand alone.

There are many links to external resources. Most of them are optional and provide additional details about topics. Therefore, I suggest that you read the book at your computer, so you can open links as I refer to them.

Some text appears in a monospace font, like this: getAccounts(). That means it’s code, inline or in blocks. Sometimes you’ll see code with weird indentation:

       document.getElementById('end-of-time').play()
     }

This means I’m annotating a large chunk of code and broke it into pieces. This piece belongs to a bigger listing that started from position 0; this small chunk won’t run by itself.

Other times, code blocks aren’t indented. In such cases, it’s generally safe to assume that the snippet is the whole thing:

ReactDOM.render(
<Content />,
  document.getElementById('content')
)

If you see a dollar sign ($), it’s a Terminal/command prompt command. For example:

$ npm install -g [email protected]

The most important thing to know and remember while using this book is that you must have fun. If it’s not fun, it’s not JavaScript!

Source code

All of the book’s code is available at www.manning.com/books/react-quickly and https://github.com/azat-co/react-quickly. Follow the folder-naming convention chNN, where NN is the chapter number with a leading 0 if needed (for example, ch02 for chapter 2’s code). The source code in the GitHub repository will evolve by including patches, bug fixes, and maybe even new versions and styles (ES2020?).

Errata

I’m sure there are typos in this book. Yes, I had editors—a bunch of them, all professionals provided by Manning. But thanks for finding that typo. No need to leave nasty Amazon reviews or send me hate mail about it, or about grammar.

Please don’t email me bugs and typos. Instead, you can report them on the book’s forum at https://forums.manning.com/forums/react-quickly or create a GitHub issue at https://github.com/azat-co/react-quickly/issues. This way, other people can benefit from your findings.

Also, please don’t email me technical questions or errata. Post them on the book’s forum, the book’s GitHub page (https://github.com/azat-co/react-quickly), or Stack Overflow. Other people may help you more quickly (and better) than I can.

Book forum

Purchase of React Quickly includes free access to a private web forum run by Manning Publications where you can make comments about the book, ask technical questions, and receive help from the author and from other users. To access the forum, go to https://forums.manning.com/forums/react-quickly. You can also learn more about Manning’s forums and the rules of conduct at https://forums.manning.com/forums/about.

Manning’s commitment to our readers is to provide a venue where a meaningful dialogue between individual readers, and between readers and the author, can take place. It is not a commitment to any specific amount of participation on the part of the author, whose contribution to the forum remains voluntary (and unpaid). We suggest you try asking the author some challenging questions lest his interest stray! The forum and the archives of previous discussions will be accessible from the publisher’s website as long as the book is in print.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.168.172