Introduction

React is an open source library for creating composable interfaces, and it is maintained by Facebook. Since its initial public release, the library has experienced a fast adoption rate and a vibrant community has sprung up around it.

The book will cover the library in detail and will discuss best practices for creating interfaces in a composable way. The React library itself is small, so the book will also cover additional tools and libraries in the React ecosystem (such as React Router and the Flux architecture) to provide the reader with enough knowledge to create complete applications.

Each topic is covered clearly and concisely, and is packed with the details you need to learn to be truly effective. The most important features are given a no-nonsense, in-depth treatment, and chapters include common problems and details on how to avoid them.

An Overview of This Book

Chapter 1 packs a lot of information to get you up and running with a basic React configuration and an overall understanding of how user interfaces are structured in React.

Chapter 2 gets deeper into JSX (React’s JavaScript language extension used to declare the component markup together with JavaScript). It also examines how to take advantage of React’s event system and virtual DOM implementation.

Chapter 3 deals with how to create complete applications by using components. You will learn about data flow in React applications and get to know components in depth (nesting components, exposing an API, props, and state).

Chapter 4 is about creating a rich experience for the end user. You will learn how to implement animations (with the help of React’s add-on CSSTransitionGroup) and drag-and-drop (using an external library called React DnD).

Chapter 5 is all about routing. You will learn how to manage the URI and set application end points using one of the most-used libraries in the React community, the React Router.

Chapter 6 presents the Flux architecture. You will learn the architecture in detail, which problems it solves, and how to integrate it within a React application.

Chapter 7 is about performance tuning. Here, you will learn how to measure your application’s performance. You will then understand how to optimize your code to obtain better performance for your application.

Chapter 8 covers isomorphic (or universal) React applications (or, how to render React on the server). This technique allows for a better perceived performance, search engine optimization, and graceful degradation (when the app works even if the local JavaScript is disabled).

Finally, Chapter 9 covers testing. You will learn how components can be tested using React’s Test Utils. You will also learn about Jest, the testing framework made by Facebook that is the preferred way to test React projects.

Who This Book Is For

The content in this book is intended for intermediate level JavaScript developers, programmers that already have experience creating front-end apps using some jQuery or maybe even some Backbone/Angular, and who need better tools and knowledge to solve the increasingly common problem of structuring complex front-end applications.

Source Code

The code for the examples shown in this book is available online in the Source Code section of the Apress web site. Visit www.apress.com, click Source Code, and look for this book’s title. You can also download the source code from this book’s home page. In addition, all the sample code and some practical extras are available on GitHub (pro-react.github.io).

Contacting the Author

Thank you for buying this book. I hope you enjoy reading it and that you find it a valuable resource. I welcome your personal feedback, questions, and comments regarding this book’s content and source code. You can contact me at [email protected].

Good luck! I am looking forward to your React applications!

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

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